diff options
author | Ryan Inch <mythologylover75@gmail.com> | 2019-12-21 10:43:15 +0300 |
---|---|---|
committer | Ryan Inch <mythologylover75@gmail.com> | 2019-12-21 10:43:15 +0300 |
commit | 4d6d1f7eed8bbeb9f439e4294a58568f9c13317b (patch) | |
tree | d4ea94236a1694a2770abeafb78e367ddc6c9e0b /object_collection_manager | |
parent | bd8d060d0be318bceb3bbcde6991ee6b2b3c513b (diff) |
Collection Manager: Fix popup sizing. Task: T69577
Fix bug with automatic window sizing based on the maximum number
of sub-levels present.
Diffstat (limited to 'object_collection_manager')
-rw-r--r-- | object_collection_manager/__init__.py | 2 | ||||
-rw-r--r-- | object_collection_manager/internals.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py index 828682a5..0c4dcca7 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": (1,8,2), + "version": (1,8,3), "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/internals.py b/object_collection_manager/internals.py index fc186684..5deadece 100644 --- a/object_collection_manager/internals.py +++ b/object_collection_manager/internals.py @@ -78,6 +78,10 @@ def update_collection_tree(context): def get_all_collections(context, collections, parent, tree, level=0, visible=False): global row_index + global max_lvl + + if level > max_lvl: + max_lvl = level for item in collections: laycol = {"id": len(layer_collections) +1, @@ -98,8 +102,6 @@ def get_all_collections(context, collections, parent, tree, level=0, visible=Fal tree.append(laycol) if len(item.children) > 0: - global max_lvl - max_lvl += 1 laycol["has_children"] = True if item.name in expanded and laycol["visible"]: |