summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 2c831979de..b5559e7f52 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1866,6 +1866,10 @@ void ScriptEditor::_update_script_names() {
if (new_cur_tab == -1 && sedata[i].index == cur_tab) {
new_cur_tab = i;
}
+ // Update index of sd entries for sorted order
+ _ScriptEditorItemData sd = sedata[i];
+ sd.index = i;
+ sedata.set(i, sd);
}
tab_container->set_current_tab(new_prev_tab);
tab_container->set_current_tab(new_cur_tab);