UndoRedo preserves index

This commit is contained in:
kobewi 2023-03-08 02:32:37 +01:00
parent b4e2637f75
commit 8f0f90c7b7

View File

@ -172,5 +172,6 @@ func delete_item():
undo_redo.add_do_method(parent_column.item_container.remove_child.bind(self)) undo_redo.add_do_method(parent_column.item_container.remove_child.bind(self))
undo_redo.add_do_method(parent_column.request_save) undo_redo.add_do_method(parent_column.request_save)
undo_redo.add_undo_method(parent_column.item_container.add_child.bind(self)) undo_redo.add_undo_method(parent_column.item_container.add_child.bind(self))
undo_redo.add_undo_method(parent_column.item_container.move_child.bind(self, get_index()))
undo_redo.add_undo_method(parent_column.request_save) undo_redo.add_undo_method(parent_column.request_save)
undo_redo.commit_action() undo_redo.commit_action()