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:
@@ -58,6 +58,7 @@ class _Frame(ArchComponent.Component):
|
||||
|
||||
def __init__(self,obj):
|
||||
ArchComponent.Component.__init__(self,obj)
|
||||
self.Type = "Frame"
|
||||
self.setProperties(obj)
|
||||
obj.IfcType = "Railing"
|
||||
|
||||
@@ -82,13 +83,16 @@ class _Frame(ArchComponent.Component):
|
||||
obj.Edges = ["All edges","Vertical edges","Horizontal edges","Bottom horizontal edges","Top horizontal edges"]
|
||||
if not "Fuse" in pl:
|
||||
obj.addProperty("App::PropertyBool","Fuse","Frame",QT_TRANSLATE_NOOP("App::Property","If true, geometry is fused, otherwise a compound"), locked=True)
|
||||
self.Type = "Frame"
|
||||
|
||||
def onDocumentRestored(self,obj):
|
||||
|
||||
ArchComponent.Component.onDocumentRestored(self,obj)
|
||||
self.setProperties(obj)
|
||||
|
||||
def loads(self,state):
|
||||
|
||||
self.Type = "Frame"
|
||||
|
||||
def execute(self,obj):
|
||||
|
||||
if self.clone(obj):
|
||||
|
||||
Reference in New Issue
Block a user