From 96291108b1027930b41a39cc1aba155ded75499f Mon Sep 17 00:00:00 2001 From: Ryan Inch Date: Tue, 20 Oct 2020 03:16:35 -0400 Subject: Collection Manager: Improve filtering 3. Task: T69577 Clean up treeview display code to be simpler and more consistent with the rest of the filtering code. --- object_collection_manager/__init__.py | 2 +- object_collection_manager/ui.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py index 1439be2f..bc62e947 100644 --- a/object_collection_manager/__init__.py +++ b/object_collection_manager/__init__.py @@ -22,7 +22,7 @@ bl_info = { "name": "Collection Manager", "description": "Manage collections and their objects", "author": "Ryan Inch", - "version": (2, 17, 0), + "version": (2, 17, 1), "blender": (2, 80, 0), "location": "View3D - Object Mode (Shortcut - M)", "warning": '', # used for warning icon and text in addons panel diff --git a/object_collection_manager/ui.py b/object_collection_manager/ui.py index a32f33c9..2177822c 100644 --- a/object_collection_manager/ui.py +++ b/object_collection_manager/ui.py @@ -822,11 +822,12 @@ class CM_UL_items(UIList): if not CM_UL_items.filtering: # display as treeview CM_UL_items.new_collections.clear() - flt_flags = [self.bitflag_filter_item] * len(list_items) + flt_flags = [0] * len(list_items) for idx, item in enumerate(list_items): - if not layer_collections[item.name]["visible"]: - flt_flags[idx] = 0 + if layer_collections[item.name]["visible"]: + flt_flags[idx] = self.bitflag_filter_item + if self.use_filter_invert: CM_UL_items.filtering = True # invert can act as pseudo filtering -- cgit v1.2.3