Fix #5204. Bug where you could attempt to add IFC objects in edit mode which isn't allowed.

This commit is contained in:
Dion Moult
2024-08-21 22:22:40 +10:00
parent 916f854905
commit 85229fc865
7 changed files with 29 additions and 8 deletions
@@ -494,6 +494,10 @@ class BIM_OT_add_door(bpy.types.Operator, tool.Ifc.Operator):
bl_label = "Door"
bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
return tool.Ifc.get() and context.mode == "OBJECT"
def _execute(self, context):
ifc_file = tool.Ifc.get()
if not ifc_file: