Arch: Fixed bug in precasts + addressing recursive wall length issue
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user