Move logic to make_sure_is_visible

This commit is contained in:
Roy Nieterau 2024-10-01 10:15:23 +02:00
parent f17529b051
commit d667f21625
2 changed files with 4 additions and 4 deletions

View file

@ -439,10 +439,13 @@ class PublisherWindow(QtWidgets.QDialog):
def make_sure_is_visible(self):
if self._window_is_visible:
self.setWindowState(QtCore.Qt.WindowActive)
else:
self.show()
self.raise_()
self.activateWindow()
self.showNormal()
def showEvent(self, event):
self._window_is_visible = True
super().showEvent(event)

View file

@ -252,9 +252,6 @@ class HostToolsHelper:
if tab:
window.set_current_tab(tab)
window.make_sure_is_visible()
window.raise_()
window.activateWindow()
window.showNormal()
def get_tool_by_name(self, tool_name, parent=None, *args, **kwargs):
"""Show tool by it's name.