From c0122cc8885b035b90cd8b70d3fe4aba0f5e4f71 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 2 Dec 2021 19:32:37 +0100 Subject: 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. --- source/blender/editors/space_file/asset_catalog_tree_view.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/editors') 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); }); } -- cgit v1.2.3