change reset logic of settings ui in tray

This commit is contained in:
iLLiCiTiT 2021-05-01 15:06:33 +02:00
parent 3d5e213c33
commit d4af1cd0f3

View file

@ -80,16 +80,20 @@ class SettingsAction(PypeModule, ITrayAction):
# Store if was visible
was_visible = self.settings_window.isVisible()
was_minimized = self.settings_window.isMinimized()
# Show settings gui
self.settings_window.show()
if was_minimized:
self.settings_window.showNormal()
# Pull window to the front.
self.settings_window.raise_()
self.settings_window.activateWindow()
# Reset content if was not visible
if not was_visible:
if not was_visible and not was_minimized:
self.settings_window.reset()