summaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index d56756502d..84808cb876 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1409,8 +1409,10 @@ void ScriptEditor::_update_members_overview() {
void ScriptEditor::_update_help_overview_visibility() {
int selected = tab_container->get_current_tab();
- if (selected < 0 || selected >= tab_container->get_child_count())
+ if (selected < 0 || selected >= tab_container->get_child_count()) {
+ help_overview->set_visible(false);
return;
+ }
Node *current = tab_container->get_child(tab_container->get_current_tab());
EditorHelp *se = Object::cast_to<EditorHelp>(current);
@@ -1427,6 +1429,7 @@ void ScriptEditor::_update_help_overview_visibility() {
}
void ScriptEditor::_update_help_overview() {
+ help_overview->clear();
int selected = tab_container->get_current_tab();
if (selected < 0 || selected >= tab_container->get_child_count())
@@ -1438,8 +1441,6 @@ void ScriptEditor::_update_help_overview() {
return;
}
- help_overview->clear();
-
Vector<Pair<String, int> > sections = se->get_sections();
for (int i = 0; i < sections.size(); i++) {
help_overview->add_item(sections[i].first);
@@ -1447,9 +1448,6 @@ void ScriptEditor::_update_help_overview() {
}
}
-void _help_overview_selected(int p_idx) {
-}
-
void ScriptEditor::_update_script_colors() {
bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_enabled");
@@ -1595,6 +1593,8 @@ void ScriptEditor::_update_script_names() {
_update_members_overview();
_update_help_overview();
+ _update_members_overview_visibility();
+ _update_help_overview_visibility();
_update_script_colors();
}