Skip to content
Snippets Groups Projects
Commit 2611bcb4f5e4 authored by Sylvain Thenault's avatar Sylvain Thenault
Browse files

fix .parent restoration

parent d53ce81da797
No related branches found
No related tags found
No related merge requests found
......@@ -153,5 +153,6 @@
self.gd_parent.where = self.node_parent
else:
self.gd_parent.children[self.parent_index] = self.node_parent
self.node_parent.parent = self.gd_parent
elif isinstance(self.node_parent, Select):
self.node_parent.where = self.node
......@@ -156,5 +157,6 @@
elif isinstance(self.node_parent, Select):
self.node_parent.where = self.node
self.node.parent = self.node_parent
else:
self.node_parent.insert(self.index, self.node)
# register reference from the removed node
......@@ -244,6 +246,7 @@
def undo(self, selection):
"""undo the operation on the union's children"""
self.select.parent = self.union
self.union.children.remove(self.select)
class RemoveSelectOperation(AppendSelectOperation):
......@@ -254,7 +257,7 @@
def undo(self, selection):
"""undo the operation on the union's children"""
self.union.children.insert(self.origindex, self.select)
self.union.insert(self.origindex, self.select)
__all__ = ('SelectionManager', 'MakeVarOperation', 'UndefineVarOperation',
'SelectVarOperation', 'UnselectVarOperation', 'AddNodeOperation',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment