diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-14 21:15:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-14 21:15:27 +0200 |
commit | ba9486a4d30f1bef11ff3629af67a87c6264f569 (patch) | |
tree | 6048fe18508d8093089ca639319fdca7076166f0 | |
parent | 0ef172c04b4ec9a9e303543c69352c05d371425d (diff) | |
parent | ca24310a13bce24961df760e84a9650aafdb6afc (diff) |
Merge pull request #12096 from Paulb23/help_overview_fixes_issue_12011_10407
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(); } |