mirror of https://github.com/borgbase/vorta
Hotfix: Fix window-toggling for KDE.
This commit is contained in:
parent
bf12aca2fb
commit
61f311c573
|
@ -1,6 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import fcntl
|
import fcntl
|
||||||
|
import sip
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
|
@ -83,8 +84,9 @@ class VortaApp(QApplication):
|
||||||
self.main_window.raise_()
|
self.main_window.raise_()
|
||||||
|
|
||||||
def toggle_main_window_visibility(self):
|
def toggle_main_window_visibility(self):
|
||||||
if self.main_window.isVisible():
|
main_window_open = hasattr(self, 'main_window') and not sip.isdeleted(self.main_window)
|
||||||
self.main_window.hide()
|
if main_window_open:
|
||||||
|
self.main_window.close()
|
||||||
else:
|
else:
|
||||||
self.open_main_window_action()
|
self.open_main_window_action()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue