From bcd2659a2f4035976fa94c36cafc1c460ac2de69 Mon Sep 17 00:00:00 2001 From: Guilherme Felipe Date: Sun, 16 Dec 2018 18:05:17 -0200 Subject: [PATCH] Fix "undo" of the state machine losing node's position --- editor/plugins/animation_state_machine_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 990c77430f..17117e635f 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1111,7 +1111,7 @@ void AnimationNodeStateMachineEditor::_erase_selected() { updating = true; undo_redo->create_action("Node Removed"); undo_redo->add_do_method(state_machine.ptr(), "remove_node", selected_node); - undo_redo->add_undo_method(state_machine.ptr(), "add_node", selected_node, state_machine->get_node(selected_node)); + undo_redo->add_undo_method(state_machine.ptr(), "add_node", selected_node, state_machine->get_node(selected_node), state_machine->get_node_position(selected_node)); for (int i = 0; i < state_machine->get_transition_count(); i++) { String from = state_machine->get_transition_from(i); String to = state_machine->get_transition_to(i);