Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-12-02 21:32:37 +0300
committerJulian Eisel <julian@blender.org>2021-12-02 21:49:48 +0300
commitc0122cc8885b035b90cd8b70d3fe4aba0f5e4f71 (patch)
tree3cf57599ffb9db5f43a5ac147f8400e22c6ee0dc /source/blender/editors/space_file/asset_catalog_tree_view.cc
parenta159f67ccc94f7880ceab7aef138703ea568ff82 (diff)
Asset Browser: Don't expand top-level catalogs by default
The "All" item will be expanded of course, and the tree will also be expanded so that the active item is visible. But feedback was that in some setups, opening all the top-level catalogs is a bit too much. So collapse them for a more compact default layout. Part of T93582.
Diffstat (limited to 'source/blender/editors/space_file/asset_catalog_tree_view.cc')
-rw-r--r--source/blender/editors/space_file/asset_catalog_tree_view.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/asset_catalog_tree_view.cc b/source/blender/editors/space_file/asset_catalog_tree_view.cc
index b8d469dfb65..47e650a7e56 100644
--- a/source/blender/editors/space_file/asset_catalog_tree_view.cc
+++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc
@@ -201,11 +201,9 @@ void AssetCatalogTreeView::build_tree()
all_item.set_collapsed(false);
if (catalog_tree_) {
+ /* Pass the "All" item on as parent of the actual catalog items. */
catalog_tree_->foreach_root_item([this, &all_item](AssetCatalogTreeItem &item) {
- ui::BasicTreeViewItem &child_view_item = build_catalog_items_recursive(all_item, item);
-
- /* Open root-level items by default. */
- child_view_item.set_collapsed(false);
+ build_catalog_items_recursive(all_item, item);
});
}