From f6f60e22f58e4f3cbedc0841217396f1a75c4db1 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Fri, 1 Nov 2019 21:14:58 +0100 Subject: Fixed error when renaming a state in AnimationNodeStateMachine Fixes #33245 --- editor/plugins/animation_state_machine_editor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index bc22d9315e..ce400ad6dd 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1117,15 +1117,17 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) { undo_redo->add_do_method(this, "_update_graph"); undo_redo->add_undo_method(this, "_update_graph"); undo_redo->commit_action(); + name_edit->hide(); updating = false; state_machine_draw->update(); - - name_edit->hide(); } void AnimationNodeStateMachineEditor::_name_edited_focus_out() { + if (updating) + return; + _name_edited(name_edit->get_text()); } -- cgit v1.2.3