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