diff --git a/src/Mod/Arch/ArchPrecast.py b/src/Mod/Arch/ArchPrecast.py index 249b5eadb9..2dc7b23cc4 100644 --- a/src/Mod/Arch/ArchPrecast.py +++ b/src/Mod/Arch/ArchPrecast.py @@ -74,7 +74,7 @@ class _Precast(ArchComponent.Component): def onDocumentRestored(self,obj): ArchComponent.Component.onDocumentRestored(self,obj) - _Precast.onDocumentRestored(self,obj) + _Precast.setProperties(self,obj) def execute(self,obj): diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index 704c3ed035..0c3a71df64 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -732,11 +732,17 @@ class _Wall(ArchComponent.Component): l = obj.Base.Shape.Length if obj.Length.Value != l: obj.Length = l + self.oldLength = None # delete the stored value to prevent triggering base change below + + def onBeforeChange(self,obj,prop): + + if prop == "Length": + self.oldLength = obj.Length.Value def onChanged(self,obj,prop): if prop == "Length": - if obj.Base and obj.Length.Value: + if obj.Base and obj.Length.Value and hasattr(self,"oldLength") and (self.oldLength != None) and (self.oldLength != obj.Length.Value): if obj.Base.isDerivedFrom("Part::Feature"): if len(obj.Base.Shape.Edges) == 1: import DraftGeomUtils