From 8f0f90c7b7133fdada12bab38308db061bd23d02 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 8 Mar 2023 02:32:37 +0100 Subject: [PATCH] UndoRedo preserves index --- addons/SimpleTODO/TODOItem.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/SimpleTODO/TODOItem.gd b/addons/SimpleTODO/TODOItem.gd index 7e20476..f93c4db 100644 --- a/addons/SimpleTODO/TODOItem.gd +++ b/addons/SimpleTODO/TODOItem.gd @@ -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.request_save) 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.commit_action()