From 65cf64bd005c9e741dc1ae34fe2335a557cf6f0e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 15 Mar 2023 10:23:31 +0100 Subject: [PATCH] Don't upgrade during pre-read This doesn't seem to be needed and it breaks when profiles have been renamed. CURA-10406 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 8813074e31..d7ee76eae4 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -71,7 +71,7 @@ class QualityChangesInfo: def __init__(self) -> None: self.name = None self.global_info = None - self.extruder_info_dict = {} # type: Dict[str, ContainerInfo] + self.extruder_info_dict = {} # type: Dict[str, ContainerInfo] class MachineInfo: @@ -461,10 +461,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader): materials_in_extruders_dict = {} # Which material is in which extruder - # if the global stack is found, we check if there are conflicts in the extruder stacks + # If the global stack is found, we check if there are conflicts in the extruder stacks for extruder_stack_file in extruder_stack_files: serialized = archive.open(extruder_stack_file).read().decode("utf-8") - serialized = ExtruderStack._updateSerialized(serialized, extruder_stack_file) parser = ConfigParser(interpolation = None) parser.read_string(serialized) @@ -506,10 +505,10 @@ class ThreeMFWorkspaceReader(WorkspaceReader): continue existing_extruder_stack = global_stack.extruderList[int(position)] - # check if there are any changes at all in any of the container stacks. + # Check if there are any changes at all in any of the container stacks. id_list = self._getContainerIdListFromSerialized(serialized) for index, container_id in enumerate(id_list): - # take into account the old empty container IDs + # Take into account the old empty container IDs container_id = self._old_empty_profile_id_dict.get(container_id, container_id) if existing_extruder_stack.getContainer(index).getId() != container_id: machine_conflict = True