Browse Source

Fix elements not being shown on first selected script/doc

Michael Alexsander 3 years ago
parent
commit
c9fe780239
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/plugins/script_editor_plugin.cpp

+ 3 - 0
editor/plugins/script_editor_plugin.cpp

@@ -2154,8 +2154,11 @@ void ScriptEditor::_update_script_names() {
 		}
 		}
 		if (tab_container->get_current_tab() == sedata_filtered[i].index) {
 		if (tab_container->get_current_tab() == sedata_filtered[i].index) {
 			script_list->select(index);
 			script_list->select(index);
+			_script_selected(index);
+
 			script_name_label->set_text(sedata_filtered[i].name);
 			script_name_label->set_text(sedata_filtered[i].name);
 			script_icon->set_texture(sedata_filtered[i].icon);
 			script_icon->set_texture(sedata_filtered[i].icon);
+
 			ScriptEditorBase *se = _get_current_editor();
 			ScriptEditorBase *se = _get_current_editor();
 			if (se) {
 			if (se) {
 				se->enable_editor();
 				se->enable_editor();