diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-18 18:54:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-18 18:54:12 +0100 |
commit | c4cc66596e735dc6d954435d6e7751b989b8f439 (patch) | |
tree | 60bbfe79d72b2590458a1c0ebc25c3bfb3838aa1 /editor/plugins/animation_state_machine_editor.cpp | |
parent | 89abfd40ed0904e680ae53ba91efcc4205bccb95 (diff) | |
parent | 2b278a5336626fb42457e512492a8a0e8d828b89 (diff) | |
download | redot-engine-c4cc66596e735dc6d954435d6e7751b989b8f439.tar.gz |
Merge pull request #24454 from YeldhamDev/animationtree_editor_small_fixes
Small fixes for the AnimationTree editor
Diffstat (limited to 'editor/plugins/animation_state_machine_editor.cpp')
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 8efd12ecf9..ee30294fe7 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1064,6 +1064,7 @@ void AnimationNodeStateMachineEditor::_open_editor(const String &p_name) { } void AnimationNodeStateMachineEditor::_removed_from_graph() { + EditorNode::get_singleton()->edit_item(NULL); } @@ -1099,7 +1100,13 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) { name_edit->hide(); } +void AnimationNodeStateMachineEditor::_name_edited_focus_out() { + + _name_edited(name_edit->get_text()); +} + void AnimationNodeStateMachineEditor::_scroll_changed(double) { + if (updating) return; @@ -1217,6 +1224,7 @@ void AnimationNodeStateMachineEditor::_bind_methods() { ClassDB::bind_method("_add_animation_type", &AnimationNodeStateMachineEditor::_add_animation_type); ClassDB::bind_method("_name_edited", &AnimationNodeStateMachineEditor::_name_edited); + ClassDB::bind_method("_name_edited_focus_out", &AnimationNodeStateMachineEditor::_name_edited_focus_out); ClassDB::bind_method("_removed_from_graph", &AnimationNodeStateMachineEditor::_removed_from_graph); @@ -1356,6 +1364,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { state_machine_draw->add_child(name_edit); name_edit->hide(); name_edit->connect("text_entered", this, "_name_edited"); + name_edit->connect("focus_exited", this, "_name_edited_focus_out"); name_edit->set_as_toplevel(true); open_file = memnew(EditorFileDialog); |