From fb1685b8a7665dd10a3e6b0e0643c9a54afcda07 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 30 May 2017 17:13:23 +0300 Subject: [PATCH] Issue #2176 Incorrect sketch after abort: deactivate of sketch overconstraint listener should be done after abort/commit is finished. Solver may send signal about healing conflicts during abort execution. --- src/PartSet/PartSet_Module.cpp | 6 ++++++ src/PartSet/PartSet_SketcherMgr.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 4ba63e7ca..e41ef1667 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -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) diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 9f8e4cf21..33b304bf1 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -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(); } -- 2.39.2