File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def setProperties(self,obj):
74
74
def onDocumentRestored (self ,obj ):
75
75
76
76
ArchComponent .Component .onDocumentRestored (self ,obj )
77
- _Precast .onDocumentRestored (self ,obj )
77
+ _Precast .setProperties (self ,obj )
78
78
79
79
def execute (self ,obj ):
80
80
Original file line number Diff line number Diff line change @@ -732,11 +732,17 @@ def execute(self,obj):
732
732
l = obj .Base .Shape .Length
733
733
if obj .Length .Value != l :
734
734
obj .Length = l
735
+ self .oldLength = None # delete the stored value to prevent triggering base change below
736
+
737
+ def onBeforeChange (self ,obj ,prop ):
738
+
739
+ if prop == "Length" :
740
+ self .oldLength = obj .Length .Value
735
741
736
742
def onChanged (self ,obj ,prop ):
737
743
738
744
if prop == "Length" :
739
- if obj .Base and obj .Length .Value :
745
+ if obj .Base and obj .Length .Value and hasattr ( self , "oldLength" ) and ( self . oldLength != None ) and ( self . oldLength != obj . Length . Value ) :
740
746
if obj .Base .isDerivedFrom ("Part::Feature" ):
741
747
if len (obj .Base .Shape .Edges ) == 1 :
742
748
import DraftGeomUtils
You can’t perform that action at this time.
0 commit comments