mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Don't reparent nodes that are children of a selected node when grouping selection
This commit is contained in:
parent
e861a8a112
commit
91e1ae69ec
1 changed files with 6 additions and 0 deletions
|
@ -1383,6 +1383,12 @@ class CuraApplication(QtApplication):
|
||||||
group_node.setPosition(center)
|
group_node.setPosition(center)
|
||||||
group_node.setCenterPosition(center)
|
group_node.setCenterPosition(center)
|
||||||
|
|
||||||
|
# Remove nodes that are directly parented to another selected node from the selection so they remain parented
|
||||||
|
selected_nodes = Selection.getAllSelectedObjects().copy()
|
||||||
|
for node in selected_nodes:
|
||||||
|
if node.getParent() in selected_nodes and not node.getParent().callDecoration("isGroup"):
|
||||||
|
Selection.remove(node)
|
||||||
|
|
||||||
# Move selected nodes into the group-node
|
# Move selected nodes into the group-node
|
||||||
Selection.applyOperation(SetParentOperation, group_node)
|
Selection.applyOperation(SetParentOperation, group_node)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue