From: azv Date: Wed, 31 Oct 2018 06:28:08 +0000 (+0300) Subject: Redisplay sketch features only for the active sketch (on appearance of the "Fully... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c6a030353ffc88a5b712d68de3992d1edb0fce50;p=modules%2Fshaper.git Redisplay sketch features only for the active sketch (on appearance of the "Fully constrained" or the "Under constrained" messages) --- diff --git a/src/PartSet/PartSet_OverconstraintListener.cpp b/src/PartSet/PartSet_OverconstraintListener.cpp index f532eab04..a7480b35a 100755 --- a/src/PartSet/PartSet_OverconstraintListener.cpp +++ b/src/PartSet/PartSet_OverconstraintListener.cpp @@ -161,6 +161,18 @@ void PartSet_OverconstraintListener::processEvent( std::set aModifiedObjects; PartSet_Module* aModule = dynamic_cast(myWorkshop->module()); CompositeFeaturePtr aSketch = aModule->sketchMgr()->activeSketch(); + + // check the sketch in the message and the active sketch are the same + std::shared_ptr anErrorMsg = + std::dynamic_pointer_cast(theMessage); + if (aSketch && anErrorMsg && !anErrorMsg->objects().empty()) { + ObjectPtr anObject = *anErrorMsg->objects().begin(); + CompositeFeaturePtr aSketchFromMsg = + std::dynamic_pointer_cast(anObject); + if (!aSketchFromMsg || aSketchFromMsg != aSketch) + aSketch = CompositeFeaturePtr(); + } + if (aSketch.get()) { int aNumberOfSubs = aSketch->numberOfSubs(); for (int i = 0; i < aNumberOfSubs; i++) {