Clear IfcStore when you load a new file. See #1222.

This commit is contained in:
Dion Moult
2021-01-26 21:28:54 +11:00
parent bbde897113
commit b71febab0d
4 changed files with 15 additions and 1 deletions
@@ -27,7 +27,12 @@ class BIM_PT_object_material(Panel):
@classmethod
def poll(cls, context):
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
props = context.active_object.BIMObjectProperties
if not props.ifc_definition_id:
return False
if not hasattr(IfcStore.get_file().by_id(props.ifc_definition_id), "HasAssociations"):
return False
return True
def draw(self, context):
self.file = IfcStore.get_file()