mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Properly set active extruder when deepcopying SettingOverrideDecorator
Fixes CURA-2022
This commit is contained in:
parent
278d6c122d
commit
9773a16bc6
1 changed files with 5 additions and 0 deletions
|
@ -37,10 +37,15 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||
self._updateNextStack()
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
print("deepcopy settingoverridedecorator")
|
||||
## Create a fresh decorator object
|
||||
deep_copy = SettingOverrideDecorator()
|
||||
## Copy the instance
|
||||
deep_copy._instance = copy.deepcopy(self._instance, memo)
|
||||
|
||||
# Properly set the right extruder on the copy
|
||||
deep_copy.setActiveExtruder(self._extruder_stack)
|
||||
|
||||
## Set the copied instance as the first (and only) instance container of the stack.
|
||||
deep_copy._stack.replaceContainer(0, deep_copy._instance)
|
||||
return deep_copy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue