This commit is contained in:
Andrej730
2024-11-14 11:20:58 +05:00
parent e74adcbba3
commit 6a20ecb2a0
@@ -109,10 +109,16 @@ class BimTool(WorkSpaceTool):
def draw_settings(cls, context, layout, ws_tool):
if context.scene.BIMGeometryProperties.mode == "ITEM":
EditItemUI.draw(context, layout)
elif context.active_object and tool.Ifc.get_entity(context.active_object):
elif (
active_ifc_object := (context.active_object and tool.Ifc.get_entity(context.active_object))
) and context.selected_objects:
EditObjectUI.draw(context, layout, ifc_element_type=cls.ifc_element_type)
else:
CreateObjectUI.draw(context, layout, ifc_element_type=cls.ifc_element_type)
# Show some UI for spatial elements that are unselectable by default.
if active_ifc_object:
EditObjectUI.layout = layout # Prevent .draw_modes from using old layout and crash.
EditObjectUI.draw_modes(context)
class WallTool(BimTool):