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

@@ -63,8 +63,8 @@ class ArchReference:
def __init__(self, obj):
obj.Proxy = self
ArchReference.setProperties(self, obj)
self.Type = "Reference"
ArchReference.setProperties(self, obj)
self.reload = True
@@ -90,7 +90,6 @@ class ArchReference:
if not "FuseArch" in pl:
t = QT_TRANSLATE_NOOP("App::Property","Fuse objects of same material")
obj.addProperty("App::PropertyBool","FuseArch", "Reference", t, locked=True)
self.Type = "Reference"
def onDocumentRestored(self, obj):
@@ -109,7 +108,7 @@ class ArchReference:
def loads(self, state):
return None
self.Type = "Reference"
def onChanged(self, obj, prop):