Skip to content
Snippets Groups Projects
Commit 6ce56e48 authored by Ryan Inch's avatar Ryan Inch
Browse files

Collection Manager: Fix button positioning. Task: T69577

Fix positioning of the Collapse/Expand and Re-numerate QCD Slots
buttons in the Collection Manager popup.
parent 2c4cb6c1
Branches
Tags
No related merge requests found
...@@ -22,7 +22,7 @@ bl_info = { ...@@ -22,7 +22,7 @@ bl_info = {
"name": "Collection Manager", "name": "Collection Manager",
"description": "Manage collections and their objects", "description": "Manage collections and their objects",
"author": "Ryan Inch", "author": "Ryan Inch",
"version": (2,7,2), "version": (2,7,3),
"blender": (2, 80, 0), "blender": (2, 80, 0),
"location": "View3D - Object Mode (Shortcut - M)", "location": "View3D - Object Mode (Shortcut - M)",
"warning": '', # used for warning icon and text in addons panel "warning": '', # used for warning icon and text in addons panel
......
...@@ -108,29 +108,31 @@ class CollectionManager(Operator): ...@@ -108,29 +108,31 @@ class CollectionManager(Operator):
layout.row().separator() layout.row().separator()
layout.row().separator() layout.row().separator()
button_row = layout.split(factor=0.3) button_row = layout.row()
button_row.alignment = 'LEFT'
sec1 = button_row.row() op_sec = button_row.row()
sec1.alignment = 'LEFT' op_sec.alignment = 'LEFT'
sec1.enabled = False
collapse_sec = op_sec.row()
collapse_sec.alignment = 'LEFT'
collapse_sec.enabled = False
if len(expanded) > 0: if len(expanded) > 0:
text = "Collapse All Items" text = "Collapse All Items"
else: else:
text = "Expand All Items" text = "Expand All Items"
sec1.operator("view3d.expand_all_items", text=text) collapse_sec.operator("view3d.expand_all_items", text=text)
for laycol in collection_tree: for laycol in collection_tree:
if laycol["has_children"]: if laycol["has_children"]:
sec1.enabled = True collapse_sec.enabled = True
break break
if context.preferences.addons[__package__].preferences.enable_qcd: if context.preferences.addons[__package__].preferences.enable_qcd:
renum = button_row.row() renum_sec = op_sec.row()
renum.alignment = 'LEFT' renum_sec.alignment = 'LEFT'
renum.operator("view3d.renumerate_qcd_slots") renum_sec.operator("view3d.renumerate_qcd_slots")
filter_sec = button_row.row() filter_sec = button_row.row()
filter_sec.alignment = 'RIGHT' filter_sec.alignment = 'RIGHT'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment