Skip to content

Commit

Permalink
execute should not be called from onChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
AIRCAP committed Sep 19, 2024
1 parent 57c781a commit b85336a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 19 deletions.
2 changes: 0 additions & 2 deletions CurvedArray.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ def onChanged(self, fp, prop):
if outOfBounds:
FreeCAD.Console.PrintWarning("Some positions are out of bounds, should all be between 0.0 and 1.0, inclusive\n")

self.execute(fp)


class CurvedArrayViewProvider:
def __init__(self, vobj):
Expand Down
3 changes: 0 additions & 3 deletions CurvedPathArray.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ def onChanged(self, fp, prop):
if not hasattr(fp, p):
return

if prop in proplist:
self.execute(fp)


class CurvedPathArrayViewProvider:
def __init__(self, vobj):
Expand Down
3 changes: 0 additions & 3 deletions CurvedSegment.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ def onChanged(self, fp, prop):
for p in proplist:
if not hasattr(fp, p):
return
if prop in proplist:
self.execute(fp)


def makeRibs(self, fp):
interpolate = False
Expand Down
6 changes: 1 addition & 5 deletions InterpolatedMiddle.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ def onChanged(self, fp, prop):
for p in proplist:
if not hasattr(fp, p):
return

if prop in proplist:
self.execute(fp)



def makeRibs(self, fp):
interpolate = False
if len(fp.Shape1.Shape.Edges) != len(fp.Shape2.Shape.Edges):
Expand Down
4 changes: 0 additions & 4 deletions NotchConnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ def __init__(self,

def onChanged(self, fp, prop):
proplist = ["Base", "Tools", "CutDirection", "ShiftLength"]
if prop in proplist:
self.execute(fp)

if prop == "CutDepth" and fp.CutDirection != Vector(0.0,0.0,0.0):
cdep = 100 - abs(fp.CutDepth)
fp.CutDirection = fp.CutDirection.normalize() * cdep / 50
self.execute(fp)


def execute(self, fp):
if not fp.Base or not fp.Tools:
Expand Down
2 changes: 0 additions & 2 deletions SurfaceCut.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ def makeFace(self, fp):

def onChanged(self, fp, prop):
props = ["Surfaces", "Position", "Normal", "Simplify"]
if prop in props:
self.execute(fp)

if prop == "Face":
if fp.Face == True:
Expand Down

0 comments on commit b85336a

Please sign in to comment.