X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OverconstraintListener.cpp;h=1b2b688fd1a55986faff84f982cbd827ab71d43b;hb=3cae3b732cbc48455adeef43b3efd6dfc1cac81d;hp=f532eab0472c5739e7dfb7e01a21017c2de37749;hpb=b91d2ac3b9986005d94823a3c502c8a7ff5ec7db;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OverconstraintListener.cpp b/src/PartSet/PartSet_OverconstraintListener.cpp old mode 100755 new mode 100644 index f532eab04..1b2b688fd --- a/src/PartSet/PartSet_OverconstraintListener.cpp +++ b/src/PartSet/PartSet_OverconstraintListener.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include @@ -161,6 +160,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++) {