From: mpv Date: Thu, 12 Dec 2019 12:12:15 +0000 (+0300) Subject: Fix for the issue #3113 : Application errors when Move to the end and split X-Git-Tag: V9_5_0a1~104 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ebe765cde2fae14aebbe2a337872cdfb44b210e7;p=modules%2Fshaper.git Fix for the issue #3113 : Application errors when Move to the end and split --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index d8896e680..09a56b188 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -535,9 +535,21 @@ bool Model_Update::processFeature(FeaturePtr theFeature) return false; } + // check this feature is not yet checked or processed + bool aIsModified = myModified.find(theFeature) != myModified.end(); + if (!aIsModified && myIsFinish) { // get info about the modification for features without preview + if (theFeature->data()->execState() == ModelAPI_StateMustBeUpdated) { + aIsModified = true; + std::set > aNewSet; + // contains itself, so, we don't know which was the reason and the reason is any + aNewSet.insert(theFeature); + myModified[theFeature] = aNewSet; + } + } + if (myProcessed.find(theFeature) == myProcessed.end()) { myProcessed[theFeature] = 0; - } else { + } else if (aIsModified) { int aCount = myProcessed[theFeature]; if (aCount > 100) { // too many repetition of processing (in VS it may crash on 330 with stack overflow) @@ -550,18 +562,6 @@ bool Model_Update::processFeature(FeaturePtr theFeature) myProcessed[theFeature] = aCount + 1; } - // check this feature is not yet checked or processed - bool aIsModified = myModified.find(theFeature) != myModified.end(); - if (!aIsModified && myIsFinish) { // get info about the modification for features without preview - if (theFeature->data()->execState() == ModelAPI_StateMustBeUpdated) { - aIsModified = true; - std::set > aNewSet; - // contains itself, so, we don't know which was the reason and the reason is any - aNewSet.insert(theFeature); - myModified[theFeature] = aNewSet; - } - } - #ifdef DEB_UPDATE std::cout<<"* Process feature "<name()<