mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Updated deepcopy to correctly copy the instance container
CURA-1636
This commit is contained in:
parent
57ce8edcd3
commit
5761307b33
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue