X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_ResultBody.cpp;h=321733a37d0228af4492c59630f2eb4becfb8024;hb=9270adddc12db9661c676544537b0e8eb78c1624;hp=ab0e703e757950db86317e19fd13e542311f0ac2;hpb=9b61e5ee5eafe9d6948d9a78667efa2abec132c3;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_ResultBody.cpp b/src/ModelAPI/ModelAPI_ResultBody.cpp index ab0e703e7..321733a37 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.cpp +++ b/src/ModelAPI/ModelAPI_ResultBody.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 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 "ModelAPI_ResultBody.h" @@ -67,6 +66,21 @@ void ModelAPI_ResultBody::storeGenerated(const GeomShapePtr& theFromShape, updateSubs(theToShape); } +void ModelAPI_ResultBody::storeGenerated( + const std::list& theFromShapes, const GeomShapePtr& theToShape, + const std::shared_ptr theMakeShape) +{ + myBuilder->storeGenerated(theFromShapes, theToShape, theMakeShape); + myConnect = ConnectionNotComputed; + + static Events_Loop* aLoop = Events_Loop::loop(); + static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY); + static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get(); + aECreator->sendUpdated(data()->owner(), aRedispEvent); + + updateSubs(theToShape, theFromShapes, theMakeShape, true); +} + void ModelAPI_ResultBody::storeModified(const GeomShapePtr& theOldShape, const GeomShapePtr& theNewShape, const bool theIsCleanStored) @@ -82,6 +96,21 @@ void ModelAPI_ResultBody::storeModified(const GeomShapePtr& theOldShape, updateSubs(theNewShape); } +void ModelAPI_ResultBody::storeModified( + const std::list& theOldShapes, const GeomShapePtr& theNewShape, + const std::shared_ptr theMakeShape) +{ + myBuilder->storeModified(theOldShapes, theNewShape, theMakeShape); + myConnect = ConnectionNotComputed; + + static Events_Loop* aLoop = Events_Loop::loop(); + static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY); + static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get(); + aECreator->sendUpdated(data()->owner(), aRedispEvent); + + updateSubs(theNewShape, theOldShapes, theMakeShape, false); +} + GeomShapePtr ModelAPI_ResultBody::shape() { return myBuilder->shape(); @@ -110,12 +139,6 @@ void ModelAPI_ResultBody::loadDeletedShapes(const GeomMakeShapePtr& theAlgo, myBuilder->loadDeletedShapes(theAlgo, theOldShape, theShapeTypeToExplore, theShapesToExclude); } -void ModelAPI_ResultBody::loadFirstLevel(GeomShapePtr theShape, - const std::string& theName) -{ - myBuilder->loadFirstLevel(theShape, theName); -} - // LCOV_EXCL_START bool ModelAPI_ResultBody::isConnectedTopology() {