mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:28:59 +08:00
Undo removing object from group now works correctly
CURA-1891
This commit is contained in:
parent
21d4e9b894
commit
03aa4f9c6a
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user