Fix duplicating SettingOverrideDecorator settings

A deepcopy of a SettingOverrideDecorator also creates a deepcopy of a SettingContainer. This SettingContainer has the same id as the original, which makes CuraContainerStack.replaceContainer reject the new SettingContainer.
This commit is contained in:
fieldOfView 2018-03-23 16:10:02 +01:00
parent 3078ac2d2d
commit 977eb8c94d
2 changed files with 4 additions and 3 deletions

View file

@ -56,7 +56,8 @@ class SettingOverrideDecorator(SceneNodeDecorator):
instance_container = copy.deepcopy(self._stack.getContainer(0), memo)
## Set the copied instance as the first (and only) instance container of the stack.
deep_copy._stack.replaceContainer(0, instance_container)
# Force replacing the container even though the id of the created deepcopy is the same
deep_copy._stack.replaceContainer(0, instance_container, force_replace = True)
# Properly set the right extruder on the copy
deep_copy.setActiveExtruder(self._extruder_stack)