[Bf-blender-cvs] [32ecda219e0] temp-asset-browser-catalogs-ui: Only show icon to add catalogs for active catalog tree item

Julian Eisel noreply at git.blender.org
Sat Sep 18 18:30:49 CEST 2021


Commit: 32ecda219e00eaf5419f0c6230d747458125f6ac
Author: Julian Eisel
Date:   Sat Sep 18 18:05:53 2021 +0200
Branches: temp-asset-browser-catalogs-ui
https://developer.blender.org/rB32ecda219e00eaf5419f0c6230d747458125f6ac

Only show icon to add catalogs for active catalog tree item

===================================================================

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 065e744cb19..a93511c9ee1 100644
--- a/source/blender/editors/space_file/asset_catalog_tree_view.cc
+++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc
@@ -87,6 +87,10 @@ class AssetCatalogTreeViewItem : public uiBasicTreeViewItem {
   {
     uiBasicTreeViewItem::build_row(row);
 
+    if (!is_active()) {
+      return;
+    }
+
     PointerRNA *props = UI_but_extra_operator_icon_add(
         button(), "ASSET_OT_catalog_new", WM_OP_EXEC_DEFAULT, ICON_ADD);
     RNA_string_set(props, "parent_path", catalog_.catalog_path().data());



More information about the Bf-blender-cvs mailing list