From ade68d25465a422af49d71881550bd89a2ecb824 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 12 Oct 2017 11:04:25 +0300 Subject: [PATCH] Fix for the issue #2274: closing the study takes too much time. --- src/Model/Model_BodyBuilder.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 4209b2401..738389350 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -94,7 +94,12 @@ static void evolutionToSelectionRec(TDF_Label theLab, const bool theFlag) { std::list >::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) { -- 2.39.2