Updated deepcopy to correctly copy the instance container

CURA-1636
This commit is contained in:
Jaime van Kessel 2016-06-07 15:45:51 +02:00
parent 57ce8edcd3
commit 5761307b33

View File

@ -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):