}
// for the current breaked, set iteration to this feature precisely
aBreaked->setCurrentBefore(theFeature);
- myModification++;
+ //myModification++;
}
// the iterator that contains breaked is found, so, nothing else is needed
return;
return;
#ifdef DEB_UPDATE
- //std::cout<<"Update Feature "<<theFeature->name()<<std::endl;
+ std::cout<<"Update Feature "<<theFeature->name()<<std::endl;
#endif
CompositeFeaturePtr aCompos = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theFeature);
// If automatice update is not needed and feature attributes were not updated right now,
if (!iterateUpdate(aCompos))
return; // iteration was interrupted, so, interrupt the update of this feature (it will be done later)
// reupdate arguments of composite feature: it may be changed during subs execution
- if (theFeature->data()->execState() != ModelAPI_StateMustBeUpdated)
+
+ // issue 955: extrusion fuse sketch naming must be updated after the sketch update
+ // so, comment this: if (theFeature->data()->execState() != ModelAPI_StateMustBeUpdated)
updateArguments(theFeature);
}
// this checking must be after the composite feature sub-elements processing:
#endif
executeFeature(theFeature);
} else {
+ #ifdef DEB_UPDATE
+ std::cout<<"Feature is not valid, erase results "<<theFeature->name()<<std::endl;
+ #endif
theFeature->eraseResults();
redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated
}
// composite feature must be executed after sub-features execution
if (aCompos) {
// number of subs can be changed in execution: like fillet
- for(int a = 0; a < aCompos->numberOfSubs(); a++) {
+ int aNumSubs = aCompos->numberOfSubs();
+ for(int a = 0; a < aNumSubs; a++) {
FeaturePtr aSub = aCompos->subFeature(a);
if (aSub.get() && aState == ModelAPI_StateDone) {
if (isOlder(theFeature, aSub)) {
}
}
}
+ if (a == aNumSubs - 1) // in case number of subs is changed, just recheck before end
+ aNumSubs = aCompos->numberOfSubs();
}
}
break;
}
} else if (mySub.get()) {
- mySub = myObjects->nextFeature(mySub);
+ while(mySub.get()) {
+ mySub = myObjects->nextFeature(mySub);
+ CompositeFeaturePtr anOwner = ModelAPI_Tools::compositeOwner(mySub);
+ // skip sub-objects, that are subs not only for this: sketch elements relatively to PartSet
+ if (!anOwner.get()) {
+ break;
+ }
+ }
}
}
}