mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Hide the backup window when the application is shutting down
CURA-8313
This commit is contained in:
parent
b1ee6d3d22
commit
51de50cd05
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,7 @@ class DrivePluginExtension(QObject, Extension):
|
||||||
|
|
||||||
# Attach signals.
|
# Attach signals.
|
||||||
CuraApplication.getInstance().getCuraAPI().account.loginStateChanged.connect(self._onLoginStateChanged)
|
CuraApplication.getInstance().getCuraAPI().account.loginStateChanged.connect(self._onLoginStateChanged)
|
||||||
|
CuraApplication.getInstance().applicationShuttingDown.connect(self._onApplicationShuttingDown)
|
||||||
self._drive_api_service.restoringStateChanged.connect(self._onRestoringStateChanged)
|
self._drive_api_service.restoringStateChanged.connect(self._onRestoringStateChanged)
|
||||||
self._drive_api_service.creatingStateChanged.connect(self._onCreatingStateChanged)
|
self._drive_api_service.creatingStateChanged.connect(self._onCreatingStateChanged)
|
||||||
|
|
||||||
|
@ -75,6 +76,9 @@ class DrivePluginExtension(QObject, Extension):
|
||||||
if self._drive_window:
|
if self._drive_window:
|
||||||
self._drive_window.show()
|
self._drive_window.show()
|
||||||
|
|
||||||
|
def _onApplicationShuttingDown(self):
|
||||||
|
self._drive_window.hide()
|
||||||
|
|
||||||
def _autoBackup(self) -> None:
|
def _autoBackup(self) -> None:
|
||||||
preferences = CuraApplication.getInstance().getPreferences()
|
preferences = CuraApplication.getInstance().getPreferences()
|
||||||
if preferences.getValue(Settings.AUTO_BACKUP_ENABLED_PREFERENCE_KEY) and self._isLastBackupTooLongAgo():
|
if preferences.getValue(Settings.AUTO_BACKUP_ENABLED_PREFERENCE_KEY) and self._isLastBackupTooLongAgo():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue