Fix #3449. Fix bug where you couldn't edit the relating type of an annotation.

This commit is contained in:
Dion Moult
2023-07-17 15:47:10 +10:00
parent 17230e4170
commit e695bdbd0d
3 changed files with 4 additions and 2 deletions
@@ -72,7 +72,7 @@ class BIM_PT_spatial(Panel):
if SpatialData.data["is_directly_contained"]:
row.operator("bim.remove_container", icon="X", text="")
else:
row.label(text="This object is not spatially contained")
row.label(text="No Spatial Container")
row.operator("bim.enable_editing_container", icon="GREASEPENCIL", text="")
for reference in SpatialData.data["references"]:
row = self.layout.row()
@@ -56,6 +56,8 @@ class TypeData:
return []
version = tool.Ifc.get_schema()
types = ifcopenshell.util.type.get_applicable_types(element.is_a(), schema=version)
if element.is_a("IfcAnnotation"):
types.append("IfcTypeProduct")
results.extend((t, t, get_entity_doc(version, t).get("description", "")) for t in types)
return results
@@ -92,7 +92,7 @@ class BIM_PT_type(Panel):
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
row.operator("bim.unassign_type", icon="X", text="")
else:
row.label(text="This object has no type")
row.label(text="No Relating Type")
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")