]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2274: closing the study takes too much time.
authormpv <mpv@opencascade.com>
Thu, 12 Oct 2017 08:04:25 +0000 (11:04 +0300)
committermpv <mpv@opencascade.com>
Thu, 12 Oct 2017 08:04:54 +0000 (11:04 +0300)
src/Model/Model_BodyBuilder.cpp

index 4209b2401ccbf509f25e120e8ecc6a8fc593d574..7383893501168275c139f7ca92e9f57e9500ac7e 100755 (executable)
@@ -94,7 +94,12 @@ static void evolutionToSelectionRec(TDF_Label theLab, const bool theFlag) {
     std::list<std::pair<TopoDS_Shape, TopoDS_Shape> >::iterator aPairsIter = aShapePairs.begin();
     for(; aPairsIter != aShapePairs.end(); aPairsIter++) {
       if (theFlag) { // disabled => make selection
-        aBuilder.Select(aPairsIter->second, aPairsIter->first);
+        if (anEvolution == TNaming_DELETE) // issue 2274 : don't put too many same null shapes
+          aBuilder.Select(aPairsIter->first, aPairsIter->first);
+        else if (anEvolution == TNaming_PRIMITIVE)
+          aBuilder.Select(aPairsIter->second, aPairsIter->second);
+        else
+          aBuilder.Select(aPairsIter->second, aPairsIter->first);
       } else if (anEvol == TNaming_GENERATED) {
         aBuilder.Generated(aPairsIter->first, aPairsIter->second);
       } else if (anEvol == TNaming_MODIFY) {