Merge pull request #33246 from nekomatata/state-machine-rename-error

Fixed error when renaming a state in AnimationNodeStateMachine
This commit is contained in:
Rémi Verschelde 2019-11-01 22:12:10 +01:00 committed by GitHub
commit 86fdb51e04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());
}