Use deepcopy to create duplicates of Nodes

This way we also include decorators and everything.

CURA-188 #start-review
This commit is contained in:
Arjen Hiemstra 2015-09-18 12:35:34 +02:00
parent 3f1e5bb44a
commit 6e0d80bf02

View file

@ -276,19 +276,13 @@ class CuraApplication(QtApplication):
new_node.callDecoration("setConvexHull",None)
op.addOperation(AddSceneNodeOperation(new_node,node.getParent().getParent()))
pass
else:
new_node = SceneNode()
new_node.setMeshData(node.getMeshData())
new_node.translate(Vector((i + 1) * node.getBoundingBox().width, node.getPosition().y, 0))
new_node.setOrientation(node.getOrientation())
new_node.setScale(node.getScale())
new_node.setSelectable(True)
new_node = copy.deepcopy(node)
new_node.callDecoration("setConvexHull", None)
op.addOperation(AddSceneNodeOperation(new_node, node.getParent()))
op.push()
## Center object on platform.
@pyqtSlot("quint64")
def centerObject(self, object_id):