From 2d480eb6326967c09b3ad0fcb7a7eb5274df853b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 28 Jul 2023 00:46:31 +0200 Subject: [PATCH] Uncollapse favorites by default in the editor FileSystem dock (cherry picked from commit 075bd4b2813298e755016be2910f1f6c28780ae9) --- editor/editor_node.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 997436ccc4d..6e8546adabf 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4965,12 +4965,17 @@ void EditorNode::_load_editor_layout() { config.instantiate(); Error err = config->load(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg")); if (err != OK) { // No config. - // If config is not found, expand the res:// folder by default. + // If config is not found, expand the res:// folder and favorites by default. TreeItem *root = FileSystemDock::get_singleton()->get_tree_control()->get_item_with_metadata("res://", 0); if (root) { root->set_collapsed(false); } + TreeItem *favorites = FileSystemDock::get_singleton()->get_tree_control()->get_item_with_metadata("Favorites", 0); + if (favorites) { + favorites->set_collapsed(false); + } + if (overridden_default_layout >= 0) { _layout_menu_option(overridden_default_layout); }