Fix bug where IfcURIReference properties wouldn't display

This commit is contained in:
Dion Moult
2023-03-12 21:54:05 +11:00
parent 88c06f5450
commit 3f94184ace
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -64,14 +64,14 @@ def draw_attribute(attribute, layout, copy_operator=None):
text=attribute.name,
)
if attribute.is_uri:
op = layout.operator("bim.select_uri_attribute", text="", icon="FILE_FOLDER")
op.data_path = attribute.path_from_id("string_value")
if attribute.is_optional:
layout.prop(attribute, "is_null", icon="RADIOBUT_OFF" if attribute.is_null else "RADIOBUT_ON", text="")
if copy_operator:
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
op.name = attribute.name
if attribute.is_uri:
op = layout.operator("bim.select_uri_attribute", text="", icon="FILE_FOLDER")
op.data_path = attribute.path_from_id("string_value")
def import_attributes(ifc_class, props, data, callback=None):
@@ -51,14 +51,14 @@ def draw_single_property(prop, layout, copy_operator=None):
value_name,
text=prop.metadata.name,
)
if prop.metadata.is_uri:
op = layout.operator("bim.select_uri_attribute", text="", icon="FILE_FOLDER")
op.data_path = prop.metadata.path_from_id("string_value")
if prop.metadata.is_optional:
layout.prop(prop.metadata, "is_null", icon="RADIOBUT_OFF" if prop.metadata.is_null else "RADIOBUT_ON", text="")
if copy_operator:
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
op.name = prop.metadata.name
if prop.metadata.is_uri:
op = layout.operator("bim.select_uri_prop", text="", icon="FILE_FOLDER")
op.data_path = prop.metadata.path_from_id("string_value")
def draw_enumerated_property(prop, layout, copy_operator=None):