ConvexHullDecorator is now correctly duplicated

The deepcopy of convex hull decorator now returns an empty (new) ConvexHulldecorator object
This ensures that the init is correctly called. CURA-665
This commit is contained in:
Jaime van Kessel 2016-01-15 15:18:16 +01:00
parent 8dc6353738
commit 44ab89724e

View file

@ -18,7 +18,12 @@ class ConvexHullDecorator(SceneNodeDecorator):
self._profile = None
Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged)
self._onActiveProfileChanged()
## Force that a new (empty) object is created upon copy.
def __deepcopy__(self, memo):
copy = ConvexHullDecorator()
return copy
def getConvexHull(self):
return self._convex_hull