diff --git a/src/blenderbim/blenderbim/bim/module/brick/prop.py b/src/blenderbim/blenderbim/bim/module/brick/prop.py index 9e4bf77592..9246e5f560 100644 --- a/src/blenderbim/blenderbim/bim/module/brick/prop.py +++ b/src/blenderbim/blenderbim/bim/module/brick/prop.py @@ -78,6 +78,7 @@ class BIMBrickProperties(PropertyGroup): bricks: CollectionProperty(name="Bricks", type=Brick) active_brick_index: IntProperty(name="Active Brick Index", update=update_active_brick_index) libraries: EnumProperty(name="Libraries", items=get_libraries) + set_list_root_toggled: BoolProperty(name="Set List Root Toggled", default=False) brick_list_root: EnumProperty(name="Brick List Root", items=get_brick_roots) # namespace manager namespace: EnumProperty(name="Namespace", items=get_namespaces) diff --git a/src/blenderbim/blenderbim/bim/module/brick/ui.py b/src/blenderbim/blenderbim/bim/module/brick/ui.py index b68416cc37..6997b0f7ab 100644 --- a/src/blenderbim/blenderbim/bim/module/brick/ui.py +++ b/src/blenderbim/blenderbim/bim/module/brick/ui.py @@ -76,10 +76,6 @@ class BIM_PT_brickschema(Panel): row.prop(data=self.props, property="new_brick_namespace_uri", text="") row.operator("bim.add_brick_namespace", text="", icon="ADD") - row = box.row(align=True) - row.operator("bim.set_brick_list_root", text="Set View") - row.prop(data=self.props, property="brick_list_root", text="") - row = self.layout.row(align=True) row.label(text="Create Entity:") @@ -103,6 +99,12 @@ class BIM_PT_brickschema(Panel): row = self.layout.row(align=True) row.label(text=self.props.active_brick_class) + row.prop(data=self.props, property="set_list_root_toggled", text="", icon="OUTLINER") + + if self.props.set_list_root_toggled: + row = self.layout.row(align=True) + row.operator("bim.set_brick_list_root", text="Set View") + row.prop(data=self.props, property="brick_list_root", text="") self.layout.template_list("BIM_UL_bricks", "", self.props, "bricks", self.props, "active_brick_index")