From: azv Date: Tue, 23 May 2017 12:10:52 +0000 (+0300) Subject: Fix regressions found by unit tests X-Git-Tag: V_2.7.1.1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1aaf3f2c1e104a8061be25a0d8591a1b8c6ca7a;p=modules%2Fshaper.git Fix regressions found by unit tests --- diff --git a/src/SketchSolver/SketchSolver_ConstraintCollinear.cpp b/src/SketchSolver/SketchSolver_ConstraintCollinear.cpp index d084f8b7d..4ca4b2a0e 100644 --- a/src/SketchSolver/SketchSolver_ConstraintCollinear.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintCollinear.cpp @@ -62,7 +62,7 @@ void SketchSolver_ConstraintCollinear::process() void SketchSolver_ConstraintCollinear::notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update* theUpdater) { - if (theFeature == myBaseConstraint) + if (theFeature == myBaseConstraint && myInSolver) return; // the constraint is already being updated PlaneGCSSolver_UpdateCoincidence* anUpdater = diff --git a/src/SketchSolver/SketchSolver_ConstraintMiddle.cpp b/src/SketchSolver/SketchSolver_ConstraintMiddle.cpp index 2a1c1c421..92f274986 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMiddle.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMiddle.cpp @@ -14,7 +14,7 @@ void SketchSolver_ConstraintMiddle::getAttributes( void SketchSolver_ConstraintMiddle::notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update* theUpdater) { - if (theFeature == myBaseConstraint) + if (theFeature == myBaseConstraint && myInSolver) return; // the constraint is already being updated PlaneGCSSolver_UpdateCoincidence* anUpdater = @@ -45,8 +45,8 @@ void SketchSolver_ConstraintMiddle::notify(const FeaturePtr& theFeature, } } else { if (myInSolver) { - myInSolver = false; myStorage->removeConstraint(myBaseConstraint); + myInSolver = false; } if (!myMiddle) {