diff options
author | Ghostkeeper <rubend@tutanota.com> | 2021-10-27 15:13:49 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2021-10-27 15:13:49 +0300 |
commit | 273e93314581c5d78ce3291167ebaaf3b8800128 (patch) | |
tree | e38e7b0996a5ebdaa45c66b5c551f8f5e6efc493 /cura | |
parent | 116046a8b2a90b3e71ad0522831b0e23438c0065 (diff) |
Reset sync status when closing and re-opening sync window
Otherwise when you want to sync again, it'll just say that you're done. Not what a user would expect, I reckon.
Contributes to issue CURA-8609.
Diffstat (limited to 'cura')
-rw-r--r-- | cura/Machines/Models/MaterialManagementModel.py | 4 | ||||
-rw-r--r-- | cura/UltimakerCloud/CloudMaterialSync.py | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/cura/Machines/Models/MaterialManagementModel.py b/cura/Machines/Models/MaterialManagementModel.py index 61d8e23acd..3595d3025a 100644 --- a/cura/Machines/Models/MaterialManagementModel.py +++ b/cura/Machines/Models/MaterialManagementModel.py @@ -272,6 +272,8 @@ class MaterialManagementModel(QObject): """ Opens the window to sync all materials. """ + self._material_sync.reset() + if self._material_sync.sync_all_dialog is None: qml_path = Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.QmlFiles, "Preferences", "Materials", "MaterialsSyncDialog.qml") self._material_sync.sync_all_dialog = cura.CuraApplication.CuraApplication.getInstance().createQmlComponent(qml_path, {}) @@ -279,4 +281,4 @@ class MaterialManagementModel(QObject): return self._material_sync.sync_all_dialog.setProperty("syncModel", self._material_sync) self._material_sync.sync_all_dialog.setProperty("pageIndex", 0) # Return to first page. - self._material_sync.sync_all_dialog.show()
\ No newline at end of file + self._material_sync.sync_all_dialog.show() diff --git a/cura/UltimakerCloud/CloudMaterialSync.py b/cura/UltimakerCloud/CloudMaterialSync.py index 3a9402c36e..05f65bb822 100644 --- a/cura/UltimakerCloud/CloudMaterialSync.py +++ b/cura/UltimakerCloud/CloudMaterialSync.py @@ -191,4 +191,10 @@ class CloudMaterialSync(QObject): @pyqtProperty("QVariantMap", fset = setPrinterStatus, notify = printerStatusChanged) def printerStatus(self) -> Dict[str, str]: - return self._printer_status
\ No newline at end of file + return self._printer_status + + def reset(self) -> None: + self.setPrinterStatus({}) + self.setExportProgress(0.0) + self._export_upload_status = "idle" + self.exportUploadStatusChanged.emit() |