Fix bug where you couldn't use userdefined types for type elements

This commit is contained in:
Dion Moult
2021-08-07 10:28:13 +10:00
parent 10011436d0
commit cdd46066fa
2 changed files with 8 additions and 2 deletions
@@ -35,7 +35,10 @@ class BIM_PT_class(Panel):
data = Data.products[props.ifc_definition_id]
name = data["type"]
if data["PredefinedType"] and data["PredefinedType"] == "USERDEFINED":
name += "[{}]".format(data["ObjectType"])
if data["ObjectType"]:
name += "[{}]".format(data["ObjectType"])
elif data["ElementType"]:
name += "[{}]".format(data["ElementType"])
elif data["PredefinedType"]:
name += "[{}]".format(data["PredefinedType"])
row = self.layout.row(align=True)