From b85336aefb2abdc89a46bb98fcc846369d7e980a Mon Sep 17 00:00:00 2001 From: Eric Price Date: Thu, 19 Sep 2024 13:05:08 +0200 Subject: [PATCH] execute should not be called from onChanged --- CurvedArray.py | 2 -- CurvedPathArray.py | 3 --- CurvedSegment.py | 3 --- InterpolatedMiddle.py | 6 +----- NotchConnector.py | 4 ---- SurfaceCut.py | 2 -- 6 files changed, 1 insertion(+), 19 deletions(-) diff --git a/CurvedArray.py b/CurvedArray.py index 9a1fe92..a55eac9 100644 --- a/CurvedArray.py +++ b/CurvedArray.py @@ -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): diff --git a/CurvedPathArray.py b/CurvedPathArray.py index f6e41c1..72faedc 100644 --- a/CurvedPathArray.py +++ b/CurvedPathArray.py @@ -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): diff --git a/CurvedSegment.py b/CurvedSegment.py index 491dd54..a78e4d1 100644 --- a/CurvedSegment.py +++ b/CurvedSegment.py @@ -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 diff --git a/InterpolatedMiddle.py b/InterpolatedMiddle.py index 19859b9..e8a900e 100644 --- a/InterpolatedMiddle.py +++ b/InterpolatedMiddle.py @@ -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): diff --git a/NotchConnector.py b/NotchConnector.py index 651d7e0..d962884 100644 --- a/NotchConnector.py +++ b/NotchConnector.py @@ -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: diff --git a/SurfaceCut.py b/SurfaceCut.py index a9741f4..7823ec9 100644 --- a/SurfaceCut.py +++ b/SurfaceCut.py @@ -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: