]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3232: Abort current operation if previous automatic constraint caused a conflict
authorvsv <vsv@opencascade.com>
Wed, 3 Jun 2020 17:41:47 +0000 (20:41 +0300)
committervsv <vsv@opencascade.com>
Wed, 3 Jun 2020 17:41:47 +0000 (20:41 +0300)
src/PartSet/PartSet_Module.cpp

index 623083bae3b4e4fb5de76ecdbcac57d30d7a015d..1e2cb917c19dbb8c5fdff14e887ed77ffff4042b 100644 (file)
@@ -1872,10 +1872,16 @@ void PartSet_Module::onConflictingConstraints()
       ModuleBase_Operation* anOpAction = new ModuleBase_Operation(aDescription);
       XGUI_OperationMgr* anOpMgr = aWorkshop->operationMgr();
 
+      ModuleBase_Operation* anOp = anOpMgr->currentOperation();
+      if (sketchMgr()->isNestedSketchOperation(anOp))
+        anOp->abort();
+
       anOpMgr->startOperation(anOpAction);
       aWorkshop->deleteFeatures(aObjectsList);
       anOpMgr->commitOperation();
       ModuleBase_Tools::flushUpdated(sketchMgr()->activeSketch());
+
+      myWorkshop->viewer()->update();
     }
   }
 }