// place where results are cleared)
myIsParamUpdated = false;
myUpdated.clear();
- myModification = 0;
+ // do not erase it since there may be modification increment on start of operation
+ //myModification = 0;
myWaitForFinish.clear();
}
}
isAutomaticChanged = true;
myIsAutomatic = true;
}
+ // modifications inside of the iteration will be different from modification that comes outside
+ myModification++;
// init iteration from the root document
iterateUpdate(CompositeFeaturePtr());
std::shared_ptr<ModelAPI_Result> aRes = *aRIter;
if (!aRes->isDisabled()) {
std::map<std::shared_ptr<ModelAPI_Object>, int >::iterator anRIter = myUpdated.find(aRes);
+ int aResultID = aRes->data()->updateID();
+ if (aResultID < anArgID)
+ return true;
if (anRIter == myUpdated.end()) // not updated at all
return true;
if (anRIter->second < anAIter->second)
aState = ModelAPI_StateExecFailed;
} else {
aState = ModelAPI_StateDone;
- myWaitForFinish.insert(theFeature);
}
} catch(...) {
aState = ModelAPI_StateExecFailed;
Events_Error::send(
"Feature " + theFeature->getKind() + " has failed during the execution");
}
+ // The macro feature has to be deleted in any case even its execution is failed
+ myWaitForFinish.insert(theFeature);
if (aState != ModelAPI_StateDone) {
theFeature->eraseResults();
}