# Copyright (c) 2026, UChicago Argonne, LLC
# BSD OPEN SOURCE LICENSE. Full license can be found in LICENSE
# Copyright (c) 2026, UChicago Argonne, LLC
# BSD OPEN SOURCE LICENSE. Full license can be found in LICENSE
import os
from qgis.PyQt.QtCore import Qt
from ..common_tools import running_on_ci


def show_diag(dlg2, maximized=False):
    if running_on_ci():
        return
    dlg2.setWindowFlags(Qt.WindowStaysOnTopHint)
    if maximized:
        dlg2.showMaximized()
    else:
        dlg2.show()
    dlg2.exec_()
