Fix bug when trying to add an ifc type occurence from the toolbar in the properties editor

This commit is contained in:
Gorgious56
2025-01-10 15:42:37 +01:00
parent a428169a13
commit 68f175fc71
2 changed files with 3 additions and 4 deletions
-2
View File
@@ -115,8 +115,6 @@ class LaunchTypeManager(bpy.types.Operator):
row.operator("bim.launch_add_element", text=f"Create New {AuthoringData.data['ifc_element_type']}", icon="ADD")
row = self.layout.row(align=True)
row.prop(props, "relating_type_id", text="")
# prop_with_search(row, props, "relating_type_id", text="", should_click_ok_to_validate=True)
row.prop(props, "search_name", icon="FILTER", text="")
columns = self.layout.column_flow(columns=3)
@@ -440,8 +440,9 @@ class CreateObjectUI:
row = cls.layout.row(align=True)
if AuthoringData.data["relating_type_id"]:
row = cls.layout.row(align=True) if ui_context != "TOOL_HEADER" else row
op = row.operator("bim.hotkey", text="Add", icon_value=custom_icon_previews["ADD"].icon_id)
op.hotkey = "S_A"
if context.space_data.type == "VIEW_3D": # Wall polyline tool works only in 3D Space
op = row.operator("bim.hotkey", text="Add", icon_value=custom_icon_previews["ADD"].icon_id)
op.hotkey = "S_A"
else:
row.label(text="No Construction Type", icon="FILE_3D")