Fix #5410 : bim.enable_adding_presentation_style no longer throws an error in a file with no ifc project when launching the search operator (F3)

This commit is contained in:
Gorgious56
2024-09-19 14:03:56 +02:00
parent 4225643bc0
commit 1974974071
@@ -547,6 +547,8 @@ class EnableAddingPresentationStyle(bpy.types.Operator):
@classmethod
def poll(cls, context):
if not tool.Ifc.get():
return False
style_type = tool.Style.get_active_style_type()
if style_type != "IfcSurfaceStyle":
cls.poll_message_set(f"Adding {style_type} is not currently supported.")