diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-12 11:18:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 11:18:10 +0200 |
commit | c7fc3dcab3c030ba8428036f6cbb1350b5312f8e (patch) | |
tree | 2d16ed2e0541cc73d1696afa8796b7811f561e62 /editor/plugins/script_editor_plugin.cpp | |
parent | 1db4b307f9d85c499223e8cf3adaadb7e4558fa4 (diff) | |
parent | 7fdb8f72c0aa1d7e64d2aab24ab5653f4c5cd594 (diff) | |
download | redot-engine-c7fc3dcab3c030ba8428036f6cbb1350b5312f8e.tar.gz |
Merge pull request #21878 from RyanStein/bugfix-14400
Make `_sort_list_on_update` true before opening files, fixes 14400
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index f90863c735..706bda4089 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1800,8 +1800,8 @@ void ScriptEditor::_update_script_names() { new_cur_tab = i; } } - tab_container->call_deferred("set_current_tab", new_prev_tab); - tab_container->call_deferred("set_current_tab", new_cur_tab); + tab_container->set_current_tab(new_prev_tab); + tab_container->set_current_tab(new_cur_tab); _sort_list_on_update = false; } @@ -2024,6 +2024,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra _go_to_tab(tab_container->get_tab_count() - 1); } + _sort_list_on_update = true; _update_script_names(); _save_layout(); se->connect("name_changed", this, "_update_script_names"); @@ -2598,6 +2599,7 @@ void ScriptEditor::_help_class_open(const String &p_class) { eh->go_to_class(p_class, 0); eh->connect("go_to_help", this, "_help_class_goto"); _add_recent_script(p_class); + _sort_list_on_update = true; _update_script_names(); _save_layout(); } @@ -2627,6 +2629,7 @@ void ScriptEditor::_help_class_goto(const String &p_desc) { eh->go_to_help(p_desc); eh->connect("go_to_help", this, "_help_class_goto"); _add_recent_script(eh->get_class()); + _sort_list_on_update = true; _update_script_names(); _save_layout(); } |