From 0023443269b906f964cb43f0aa0576da3f6b236c Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 18 Nov 2015 11:55:41 +0300 Subject: [PATCH] The reentrant operation should not be started if the current sketch has an error. --- src/PartSet/PartSet_SketcherReetntrantMgr.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp index 24d2b3309..63fa9c9b1 100755 --- a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp +++ b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp @@ -181,15 +181,18 @@ void PartSet_SketcherReetntrantMgr::onNoMoreWidgets(const std::string& thePrevio if (!myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) return; - if (aFOperation && PartSet_SketcherMgr::isNestedSketchOperation(aFOperation)) { - bool isStarted = false; + bool isStarted = false; + bool isSketchSolverError = module()->sketchMgr()->sketchSolverError(); + if (!isSketchSolverError && + aFOperation && PartSet_SketcherMgr::isNestedSketchOperation(aFOperation)) { if (myRestartingMode != RM_Forbided) { myRestartingMode = RM_LastFeatureUsed; isStarted = startInternalEdit(thePreviousAttributeID); } - if (!isStarted) - aFOperation->commit(); } + + if (!isStarted) + aFOperation->commit(); } bool PartSet_SketcherReetntrantMgr::processEnter(const std::string& thePreviousAttributeID) @@ -204,8 +207,11 @@ bool PartSet_SketcherReetntrantMgr::processEnter(const std::string& thePreviousA if (!myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) return isDone; - myRestartingMode = RM_EmptyFeatureUsed; - isDone = startInternalEdit(thePreviousAttributeID); + bool isSketchSolverError = module()->sketchMgr()->sketchSolverError(); + if (!isSketchSolverError) { + myRestartingMode = RM_EmptyFeatureUsed; + isDone = startInternalEdit(thePreviousAttributeID); + } return isDone; } -- 2.39.2