summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-16 21:30:32 +0100
committerGitHub <noreply@github.com>2018-12-16 21:30:32 +0100
commit4cf2d5bffed895aff00626bdf53300c9ddbd9cf1 (patch)
treeff8ef8b9068136b5a6708f888307229b3b0da4cb /editor/plugins
parent9c7bc127b9f719b4fe6a14dd2c8745fc64cf1b32 (diff)
parentbcd2659a2f4035976fa94c36cafc1c460ac2de69 (diff)
Merge pull request #24405 from guilhermefelipecgs/fix_undo_fsm
Fix "undo" of the state machine losing node's position
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp2
1 files changed, 1 insertions, 1 deletions
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);