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.
This commit is contained in:
Ghostkeeper 2021-10-27 14:13:49 +02:00
parent 116046a8b2
commit 273e933145
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
2 changed files with 10 additions and 2 deletions

View file

@ -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()
self._material_sync.sync_all_dialog.show()