mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Use deepcopy to create duplicates of Nodes
This way we also include decorators and everything. CURA-188 #start-review
This commit is contained in:
parent
3f1e5bb44a
commit
6e0d80bf02
1 changed files with 4 additions and 10 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue