Merge pull request #24405 from guilhermefelipecgs/fix_undo_fsm
Fix "undo" of the state machine losing node's position
This commit is contained in:
commit
4cf2d5bffe
1 changed files with 1 additions and 1 deletions
|
@ -1111,7 +1111,7 @@ void AnimationNodeStateMachineEditor::_erase_selected() {
|
||||||
updating = true;
|
updating = true;
|
||||||
undo_redo->create_action("Node Removed");
|
undo_redo->create_action("Node Removed");
|
||||||
undo_redo->add_do_method(state_machine.ptr(), "remove_node", selected_node);
|
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++) {
|
for (int i = 0; i < state_machine->get_transition_count(); i++) {
|
||||||
String from = state_machine->get_transition_from(i);
|
String from = state_machine->get_transition_from(i);
|
||||||
String to = state_machine->get_transition_to(i);
|
String to = state_machine->get_transition_to(i);
|
||||||
|
|
Loading…
Reference in a new issue