mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
closes #5876: be able to 'apply void' no matter which order you select the wall (or any other class object) and void.
This commit is contained in:
@@ -368,6 +368,10 @@ class CreateObjectUI:
|
|||||||
cls.draw_thumbnail(context)
|
cls.draw_thumbnail(context)
|
||||||
cls.draw_add_object_parameters(context)
|
cls.draw_add_object_parameters(context)
|
||||||
cls.draw_add_object(context)
|
cls.draw_add_object(context)
|
||||||
|
if len(context.selected_objects) == 2 and tool.Ifc.get_entity(context.selected_objects[0]):
|
||||||
|
op_icon = custom_icon_previews["APPLY_VOID"].icon_id
|
||||||
|
row = layout.row(align=True)
|
||||||
|
row.operator("bim.add_opening", text="Apply Void", icon_value=op_icon)
|
||||||
else:
|
else:
|
||||||
cls.draw_type_manager_launcher(context)
|
cls.draw_type_manager_launcher(context)
|
||||||
|
|
||||||
@@ -805,6 +809,8 @@ class EditObjectUI:
|
|||||||
op_icon = custom_icon_previews["APPLY_VOID"].icon_id
|
op_icon = custom_icon_previews["APPLY_VOID"].icon_id
|
||||||
row = cls.layout.row(align=True) if ui_context != "TOOL_HEADER" else row
|
row = cls.layout.row(align=True) if ui_context != "TOOL_HEADER" else row
|
||||||
row.operator("bim.add_opening", text=op_text, icon_value=op_icon)
|
row.operator("bim.add_opening", text=op_text, icon_value=op_icon)
|
||||||
|
row.label(text="", icon="EVENT_SHIFT")
|
||||||
|
row.label(text="", icon="EVENT_O")
|
||||||
else:
|
else:
|
||||||
op_text = "Add Void" if ui_context != "TOOL_HEADER" else ""
|
op_text = "Add Void" if ui_context != "TOOL_HEADER" else ""
|
||||||
op_icon = custom_icon_previews["ADD_VOID"].icon_id
|
op_icon = custom_icon_previews["ADD_VOID"].icon_id
|
||||||
|
|||||||
Reference in New Issue
Block a user