mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 08:15:11 +08:00
Updated deepcopy to correctly copy the instance container
CURA-1636
This commit is contained in:
parent
57ce8edcd3
commit
5761307b33
@ -29,10 +29,10 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||
def __deepcopy__(self, memo):
|
||||
## Create a fresh decorator object
|
||||
deep_copy = SettingOverrideDecorator()
|
||||
## Copy the stack
|
||||
deep_copy._stack = copy.deepcopy(self._stack, memo)
|
||||
## Ensure that the id is unique.
|
||||
deep_copy._stack._id = id(deep_copy)
|
||||
## Copy the instance
|
||||
deep_copy._instance = copy.deepcopy(self._instance, memo)
|
||||
## 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
|
||||
|
||||
def _onSettingChanged(self, instance, property):
|
||||
|
Loading…
x
Reference in New Issue
Block a user