mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 07:29:03 +08:00
Don't reparent nodes that are children of a selected node when grouping selection
This commit is contained in:
parent
e861a8a112
commit
91e1ae69ec
@ -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…
x
Reference in New Issue
Block a user