BIM: fix setting of self.Type

Fixes #21364.

`self.Type` should be set in `__init__` and `loads`, and not in `onDocumentRestored`.

Additionally:
fixed mistake in `loads` in ifc_objects.py.
This commit is contained in:
Roy-043
2025-06-26 13:58:12 +02:00
committed by Chris Hennes
parent 8add557e2f
commit 90a6bb7ea4
27 changed files with 109 additions and 60 deletions

View File

@@ -123,7 +123,7 @@ class ifc_object:
the object references a Type that has a Classification property,
so we move copy the Type's property to our actual object.
"""
if not getattr(obj, "Type", None):
return
@@ -170,9 +170,8 @@ class ifc_object:
return getattr(self, "Type", None)
def loads(self, state):
if state and hasattr(state, "Type"):
if state:
self.Type = state
return None
def execute(self, obj):
from . import ifc_generator # lazy import