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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user