X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Update.cpp;h=09a56b18841be280804691a95982130a7ea5da6f;hb=bdfef16c6cd1f7cb83c1a1117e3e3d76b7063c26;hp=f86c3076b240ecde193a2eb4955552fbbed23100;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index f86c3076b..09a56b188 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -441,7 +441,7 @@ void Model_Update::processEvent(const std::shared_ptr& theMessag Events_Loop::loop()->flush(kRedisplayEvent); // in the end of transaction everything is updated, so clear the old objects - myIsParamUpdated = false; + //myIsParamUpdated = false; // to avoid problems in sprocket.py parameter update myWaitForFinish.clear(); } else if (theMessage->eventID() == kReorderEvent) { std::shared_ptr aMsg = @@ -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()<isStable()) { aDoExecute = true; - } else if (theFeature->results().size()) { // execute only not-results features - aDoExecute = !(theFeature->firstResult()->groupName() == ModelAPI_ResultBody::group() || - theFeature->firstResult()->groupName() == ModelAPI_ResultPart::group() || - theFeature->getKind() == "Sketch"); + } else if (theFeature->results().size()) { // execute only not persistent results features + aDoExecute = !theFeature->isPersistentResult(); } else { aDoExecute = aState != ModelAPI_StateInvalidArgument; }