mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
When project loading needs to create a new machine, also create a new definition changes
CURA-4345
This commit is contained in:
parent
03a159e423
commit
e5f3d45385
2 changed files with 7 additions and 1 deletions
|
@ -748,6 +748,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
# MUST get updated too.
|
# MUST get updated too.
|
||||||
#
|
#
|
||||||
if self._resolve_strategies["machine"] == "new":
|
if self._resolve_strategies["machine"] == "new":
|
||||||
|
|
||||||
# A new machine was made, but it was serialized with the wrong user container. Fix that now.
|
# A new machine was made, but it was serialized with the wrong user container. Fix that now.
|
||||||
for container in user_instance_containers:
|
for container in user_instance_containers:
|
||||||
# replacing the container ID for user instance containers for the extruders
|
# replacing the container ID for user instance containers for the extruders
|
||||||
|
|
|
@ -26,7 +26,7 @@ class WorkspaceDialog(QObject):
|
||||||
self._view = None
|
self._view = None
|
||||||
self._qml_url = "WorkspaceDialog.qml"
|
self._qml_url = "WorkspaceDialog.qml"
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
self._default_strategy = "override"
|
self._default_strategy = None
|
||||||
self._result = {"machine": self._default_strategy,
|
self._result = {"machine": self._default_strategy,
|
||||||
"quality_changes": self._default_strategy,
|
"quality_changes": self._default_strategy,
|
||||||
"definition_changes": self._default_strategy,
|
"definition_changes": self._default_strategy,
|
||||||
|
@ -233,6 +233,11 @@ class WorkspaceDialog(QObject):
|
||||||
self._result["quality_changes"] = None
|
self._result["quality_changes"] = None
|
||||||
if "definition_changes" in self._result and not self._has_definition_changes_conflict:
|
if "definition_changes" in self._result and not self._has_definition_changes_conflict:
|
||||||
self._result["definition_changes"] = None
|
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:
|
||||||
|
self._result["definition_changes"] = "new"
|
||||||
|
|
||||||
if "material" in self._result and not self._has_material_conflict:
|
if "material" in self._result and not self._has_material_conflict:
|
||||||
self._result["material"] = None
|
self._result["material"] = None
|
||||||
return self._result
|
return self._result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue