Merge pull request #38351 from avril-gh/remember-scripts-panel-visibility-in-project-metadata

preserve scripts panel visibility state between sessions in project metadata
This commit is contained in:
Rémi Verschelde 2021-02-25 21:17:02 +01:00 committed by GitHub
commit fb301a0c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -996,6 +996,7 @@ Array ScriptEditor::_get_open_scripts() const {
bool ScriptEditor::toggle_scripts_panel() {
list_split->set_visible(!list_split->is_visible());
EditorSettings::get_singleton()->set_project_metadata("scripts_panel", "show_scripts_panel", list_split->is_visible());
return list_split->is_visible();
}
@ -3288,6 +3289,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
list_split->add_child(overview_vbox);
list_split->set_visible(EditorSettings::get_singleton()->get_project_metadata("scripts_panel", "show_scripts_panel", true));
buttons_hbox = memnew(HBoxContainer);
overview_vbox->add_child(buttons_hbox);