mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Only show type selection buttons when a type is available.
This commit is contained in:
@@ -81,14 +81,13 @@ class BIM_PT_type(Panel):
|
||||
Data.products[oprops.ifc_definition_id]["type"], Data.products[oprops.ifc_definition_id]["Name"]
|
||||
)
|
||||
if name == "None/None":
|
||||
label = "This object has no type"
|
||||
row.label(text="This object has no type")
|
||||
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
||||
else:
|
||||
label = name
|
||||
row.label(text=label)
|
||||
row.operator("bim.select_type", icon="TRACKER", text="")
|
||||
row.operator("bim.select_similar_type", icon="RESTRICT_SELECT_OFF", text="")
|
||||
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
||||
if name != "None/None":
|
||||
row.label(text=name)
|
||||
row.operator("bim.select_type", icon="TRACKER", text="")
|
||||
row.operator("bim.select_similar_type", icon="RESTRICT_SELECT_OFF", text="")
|
||||
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
||||
row.operator("bim.unassign_type", icon="X", text="")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user