From ba612f188a83c04d58573d53bf30bff6945d268d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 15 Jul 2015 14:36:43 +0200 Subject: [PATCH] Grouping & ungrouping now has correct selection behaviour --- cura/CuraApplication.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f831a79b11..5ecad545f7 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -425,8 +425,14 @@ class CuraApplication(QtApplication): group_decorator = GroupDecorator() group_node.addDecorator(group_decorator) group_node.setParent(self.getController().getScene().getRoot()) + for node in Selection.getAllSelectedObjects(): node.setParent(group_node) + + for node in group_node.getChildren(): + Selection.remove(node) + + Selection.add(group_node) @pyqtSlot() def ungroupSelected(self): @@ -440,6 +446,7 @@ class CuraApplication(QtApplication): for child in children_to_move: child.setParent(node.getParent()) + Selection.add(child) child.callDecoration("setConvexHull",None) node.setParent(None) ungrouped_nodes.append(node)