}
// searching for the next not used reason
aProcessedReasons.insert(aReason);
- aReasons.erase(aReason);
+ // check theFeature is still in the list of modified, because it may be removed sometimes
+ // while updating SketchPlugin_Ellipse
+ if (myModified.find(theFeature) != myModified.end())
+ aReasons.erase(aReason);
+ else
+ break;
}
// restore the modified reasons: they will be used in the update of arguments
if (allSubsUsed) { // restore theFeature in this set
if (myUpdateBlocked) {
if (!theFeature->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;
}