From 6e0d80bf026c3f15417b981b4c5061c360721e48 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Fri, 18 Sep 2015 12:35:34 +0200 Subject: [PATCH] Use deepcopy to create duplicates of Nodes This way we also include decorators and everything. CURA-188 #start-review --- cura/CuraApplication.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index a4f274c719..5cf06bed65 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -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):