X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSetPlugin%2FPartSetPlugin_Remove.cpp;h=0c47368fc1eeb4ea8c56f0a99c44e78b33c3eb1a;hb=0b503091623876eda1ae9214e32f8831ef03778b;hp=3f2cd80fe609d6724d1c41f30247cae83bbba9db;hpb=4783f146b71a48c651523fcf0e12367bcf3d1fa8;p=modules%2Fshaper.git diff --git a/src/PartSetPlugin/PartSetPlugin_Remove.cpp b/src/PartSetPlugin/PartSetPlugin_Remove.cpp index 3f2cd80fe..0c47368fc 100644 --- a/src/PartSetPlugin/PartSetPlugin_Remove.cpp +++ b/src/PartSetPlugin/PartSetPlugin_Remove.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: PartSetPlugin_Remove.cxx // Created: 20 May 2014 // Author: Mikhail PONIKAROV @@ -9,6 +11,7 @@ #include #include #include +#include void PartSetPlugin_Remove::execute() { @@ -26,7 +29,10 @@ void PartSetPlugin_Remove::execute() if (aFeature) { // do remove aPart->data()->document(ModelAPI_ResultPart::DOC_REF())->value()->close(); - aRoot->removeFeature(aFeature); + std::set > aRefFeatures; + aRoot->refsToFeature(aFeature, aRefFeatures); + if (aRefFeatures.empty()) + aRoot->removeFeature(aFeature); } } }