+ // iterate everything and add efatures in state "MustBeUpdated" into modified
+ std::list<std::shared_ptr<ModelAPI_Document> > allDocs =
+ ModelAPI_Session::get()->allOpenedDocuments();
+ std::list<std::shared_ptr<ModelAPI_Document> >::iterator aDoc = allDocs.begin();
+ for(; aDoc != allDocs.end(); aDoc++) {
+ std::list<std::shared_ptr<ModelAPI_Feature> > allFeats = (*aDoc)->allFeatures();
+ std::list<std::shared_ptr<ModelAPI_Feature> >::iterator aFeat = allFeats.begin();
+ for(; aFeat != allFeats.end(); aFeat++) {
+ if ((*aFeat)->data()->isValid() &&
+ (*aFeat)->data()->execState() == ModelAPI_StateMustBeUpdated) {
+ addModified(*aFeat, FeaturePtr());
+ }
+ }
+ }