From 91e1ae69ec52c954b2ad9c20b1254a32c0ed55c1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 19 Mar 2018 14:35:08 +0100 Subject: [PATCH] Don't reparent nodes that are children of a selected node when grouping selection --- cura/CuraApplication.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 2e641f145a..6351d43c79 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1383,6 +1383,12 @@ class CuraApplication(QtApplication): group_node.setPosition(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 Selection.applyOperation(SetParentOperation, group_node)