mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
In project loading dialog the CANCLE button did not work
CURA-4345
This commit is contained in:
parent
4ddfb81897
commit
d7ed8244ae
1 changed files with 4 additions and 3 deletions
|
@ -235,7 +235,7 @@ class WorkspaceDialog(QObject):
|
|||
self._result["definition_changes"] = None
|
||||
|
||||
# If the machine needs to be re-created, the definition_changes should also be re-created.
|
||||
if self._result["machine"] == "new" and self._result["definition_changes"] is None:
|
||||
if "machine" in self._result and self._result["machine"] == "new" and self._result["definition_changes"] is None:
|
||||
self._result["definition_changes"] = "new"
|
||||
|
||||
if "material" in self._result and not self._has_material_conflict:
|
||||
|
@ -267,7 +267,7 @@ class WorkspaceDialog(QObject):
|
|||
@pyqtSlot()
|
||||
## Used to notify the dialog so the lock can be released.
|
||||
def notifyClosed(self):
|
||||
self._result = {}
|
||||
self._result = {} # The result should be cleared before hide, because after it is released the main thread lock
|
||||
self._visible = False
|
||||
self._lock.release()
|
||||
|
||||
|
@ -283,9 +283,10 @@ class WorkspaceDialog(QObject):
|
|||
|
||||
@pyqtSlot()
|
||||
def onCancelButtonClicked(self):
|
||||
self._result = {}
|
||||
self._view.hide()
|
||||
self.hide()
|
||||
self._result = {}
|
||||
|
||||
|
||||
## Block thread until the dialog is closed.
|
||||
def waitForClose(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue