diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2017-10-14 18:51:35 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2017-10-14 18:51:35 +0100 |
commit | ca24310a13bce24961df760e84a9650aafdb6afc (patch) | |
tree | a2fed7ca20aa56f6e310d76a1bb313e4e8e53758 | |
parent | 9862dcd0cb29ddd4900d6fe7eea862644ed37bbe (diff) |
Fixed help overview visibility, issue 12011 and 10407
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 12 |
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(); } |