]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
The reentrant operation should not be started if the current sketch has an error.
authornds <nds@opencascade.com>
Wed, 18 Nov 2015 08:55:41 +0000 (11:55 +0300)
committernds <nds@opencascade.com>
Wed, 18 Nov 2015 08:56:06 +0000 (11:56 +0300)
src/PartSet/PartSet_SketcherReetntrantMgr.cpp

index 24d2b33098234a22a9bf43acdd7eff8722c109c5..63fa9c9b131af0966aeaa8da374d802bc5d65b8c 100755 (executable)
@@ -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;
 }