summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-11-01 22:12:10 +0100
committerGitHub <noreply@github.com>2019-11-01 22:12:10 +0100
commit86fdb51e04a10362b502df95dd52286701aec521 (patch)
tree7bad80adf8bdd4f06d76f56732dee92a2a41c689
parent9fcd38fc70090d2f5eabb2f7effe6a28fa433e9c (diff)
parentf6f60e22f58e4f3cbedc0841217396f1a75c4db1 (diff)
Merge pull request #33246 from nekomatata/state-machine-rename-error
Fixed error when renaming a state in AnimationNodeStateMachine
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp6
1 files 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());
}