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:
@@ -67,6 +67,7 @@ class _Panel(ArchComponent.Component):
|
||||
def __init__(self,obj):
|
||||
|
||||
ArchComponent.Component.__init__(self,obj)
|
||||
self.Type = "Panel"
|
||||
self.setProperties(obj)
|
||||
obj.IfcType = "Plate"
|
||||
|
||||
@@ -104,7 +105,6 @@ class _Panel(ArchComponent.Component):
|
||||
obj.FaceMaker = ["None","Simple","Cheese","Bullseye"]
|
||||
if not "Normal" in pl:
|
||||
obj.addProperty("App::PropertyVector","Normal","Panel",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"), locked=True)
|
||||
self.Type = "Panel"
|
||||
obj.setEditorMode("VerticalArea",2)
|
||||
obj.setEditorMode("HorizontalArea",2)
|
||||
|
||||
@@ -113,6 +113,10 @@ class _Panel(ArchComponent.Component):
|
||||
ArchComponent.Component.onDocumentRestored(self,obj)
|
||||
self.setProperties(obj)
|
||||
|
||||
def loads(self,state):
|
||||
|
||||
self.Type = "Panel"
|
||||
|
||||
def execute(self,obj):
|
||||
|
||||
"creates the panel shape"
|
||||
|
||||
Reference in New Issue
Block a user