]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2176 Incorrect sketch after abort: deactivate of sketch overconstraint listene...
authornds <nds@opencascade.com>
Tue, 30 May 2017 14:13:23 +0000 (17:13 +0300)
committernds <nds@opencascade.com>
Tue, 30 May 2017 14:13:23 +0000 (17:13 +0300)
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.cpp

index 4ba63e7ca694ec2200c70a56fc2e332a822148cd..e41ef16671c8a9ec0d5c00ae778bc22d8fcea09c 100755 (executable)
@@ -255,6 +255,9 @@ void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation)
   if (sketchMgr()->isNestedSketchOperation(theOperation)) {
     mySketchMgr->commitNestedSketch(theOperation);
   }
+  /// deactivate of overconstraint listener should be performed after Sketch commit (#2176)
+  if (PartSet_SketcherMgr::isSketchOperation(theOperation))
+    overconstraintListener()->setActive(false);
 
   /// Restart sketcher operations automatically
   if (!mySketchReentrantMgr->operationCommitted(theOperation)) {
@@ -274,6 +277,9 @@ void PartSet_Module::operationAborted(ModuleBase_Operation* theOperation)
 {
   /// Restart sketcher operations automatically
   mySketchReentrantMgr->operationAborted(theOperation);
+  /// deactivate of overconstraint listener should be performed after Sketch abort (#2176)
+  if (PartSet_SketcherMgr::isSketchOperation(theOperation))
+    overconstraintListener()->setActive(false);
 }
 
 void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation)
index 9f8e4cf21d37471a3a9b90ce9947560c1421cb90..33b304bf14cb21e43d42f85995818354923869db 100755 (executable)
@@ -1050,7 +1050,6 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
 
     Events_Loop::loop()->flush(aDispEvent);
   }
-  myModule->overconstraintListener()->setActive(false);
   // restore the module selection modes, which were changed on startSketch
   aConnector->activateModuleSelectionModes();
 }