[Bf-blender-cvs] [c0122cc8885] master: Asset Browser: Don't expand top-level catalogs by default
Julian Eisel
noreply at git.blender.org
Thu Dec 2 19:49:54 CET 2021
Commit: c0122cc8885b035b90cd8b70d3fe4aba0f5e4f71
Author: Julian Eisel
Date: Thu Dec 2 19:32:37 2021 +0100
Branches: master
https://developer.blender.org/rBc0122cc8885b035b90cd8b70d3fe4aba0f5e4f71
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.
===================================================================
M source/blender/editors/space_file/asset_catalog_tree_view.cc
===================================================================
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);
});
}
More information about the Bf-blender-cvs
mailing list