mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:25:51 +08:00
Properly set active extruder when deepcopying SettingOverrideDecorator
Fixes CURA-2022
This commit is contained in:
parent
278d6c122d
commit
9773a16bc6
@ -37,10 +37,15 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
self._updateNextStack()
|
self._updateNextStack()
|
||||||
|
|
||||||
def __deepcopy__(self, memo):
|
def __deepcopy__(self, memo):
|
||||||
|
print("deepcopy settingoverridedecorator")
|
||||||
## Create a fresh decorator object
|
## Create a fresh decorator object
|
||||||
deep_copy = SettingOverrideDecorator()
|
deep_copy = SettingOverrideDecorator()
|
||||||
## Copy the instance
|
## Copy the instance
|
||||||
deep_copy._instance = copy.deepcopy(self._instance, memo)
|
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.
|
## Set the copied instance as the first (and only) instance container of the stack.
|
||||||
deep_copy._stack.replaceContainer(0, deep_copy._instance)
|
deep_copy._stack.replaceContainer(0, deep_copy._instance)
|
||||||
return deep_copy
|
return deep_copy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user