From 03aa4f9c6a4e856079f1f4624b23ce80ae3586d0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 29 Jul 2016 11:05:11 +0200 Subject: [PATCH] Undo removing object from group now works correctly CURA-1891 --- cura/CuraApplication.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 2de70b7304..9c3e2511c1 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -565,8 +565,7 @@ class CuraApplication(QtApplication): remaining_nodes_in_group = list(set(group_node.getChildren()) - set(nodes)) if len(remaining_nodes_in_group) == 1: removed_group_nodes.append(group_node) - remaining_nodes_in_group[0].translate(group_node.getPosition()) - remaining_nodes_in_group[0].setParent(group_node.getParent()) + op.addOperation(SetParentOperation(remaining_nodes_in_group[0], group_node.getParent())) op.addOperation(RemoveSceneNodeOperation(group_node)) op.push() @@ -593,8 +592,7 @@ class CuraApplication(QtApplication): op.push() if group_node: if len(group_node.getChildren()) == 1 and group_node.callDecoration("isGroup"): - group_node.getChildren()[0].translate(group_node.getPosition()) - group_node.getChildren()[0].setParent(group_node.getParent()) + op.addOperation(SetParentOperation(group_node.getChildren()[0], group_node.getParent())) op = RemoveSceneNodeOperation(group_node) op.push()