mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix #3449. Fix bug where you couldn't edit the relating type of an annotation.
This commit is contained in:
@@ -72,7 +72,7 @@ class BIM_PT_spatial(Panel):
|
|||||||
if SpatialData.data["is_directly_contained"]:
|
if SpatialData.data["is_directly_contained"]:
|
||||||
row.operator("bim.remove_container", icon="X", text="")
|
row.operator("bim.remove_container", icon="X", text="")
|
||||||
else:
|
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="")
|
row.operator("bim.enable_editing_container", icon="GREASEPENCIL", text="")
|
||||||
for reference in SpatialData.data["references"]:
|
for reference in SpatialData.data["references"]:
|
||||||
row = self.layout.row()
|
row = self.layout.row()
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ class TypeData:
|
|||||||
return []
|
return []
|
||||||
version = tool.Ifc.get_schema()
|
version = tool.Ifc.get_schema()
|
||||||
types = ifcopenshell.util.type.get_applicable_types(element.is_a(), schema=version)
|
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)
|
results.extend((t, t, get_entity_doc(version, t).get("description", "")) for t in types)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class BIM_PT_type(Panel):
|
|||||||
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
||||||
row.operator("bim.unassign_type", icon="X", text="")
|
row.operator("bim.unassign_type", icon="X", text="")
|
||||||
else:
|
else:
|
||||||
row.label(text="This object has no type")
|
row.label(text="No Relating Type")
|
||||||
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user