mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Fix project load, new non existing machine. CURA-3756
This commit is contained in:
parent
502b6b6f08
commit
79561f44b1
1 changed files with 9 additions and 1 deletions
|
@ -262,6 +262,10 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
return WorkspaceReader.PreReadResult.cancelled
|
return WorkspaceReader.PreReadResult.cancelled
|
||||||
|
|
||||||
self._resolve_strategies = self._dialog.getResult()
|
self._resolve_strategies = self._dialog.getResult()
|
||||||
|
# Default values
|
||||||
|
for k, v in self._resolve_strategies.items():
|
||||||
|
if v is None:
|
||||||
|
self._resolve_strategies[k] = "new"
|
||||||
|
|
||||||
return WorkspaceReader.PreReadResult.accepted
|
return WorkspaceReader.PreReadResult.accepted
|
||||||
|
|
||||||
|
@ -582,7 +586,11 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
self._container_registry.addContainer(container)
|
self._container_registry.addContainer(container)
|
||||||
|
|
||||||
# Replace the quality/definition changes container
|
# Replace the quality/definition changes container
|
||||||
old_container = global_stack.findContainer({"type": container_type})
|
if container_type == "quality_changes":
|
||||||
|
old_container = global_stack.qualityChanges
|
||||||
|
elif container_type == "definition_changes":
|
||||||
|
old_container = global_stack.definitionChanges
|
||||||
|
# old_container = global_stack.findContainer({"type": container_type})
|
||||||
if old_container.getId() == old_id:
|
if old_container.getId() == old_id:
|
||||||
changes_index = global_stack.getContainerIndex(old_container)
|
changes_index = global_stack.getContainerIndex(old_container)
|
||||||
global_stack.replaceContainer(changes_index, container)
|
global_stack.replaceContainer(changes_index, container)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue