// in transaction for nesting correct working
myDoc->NewCommand();
TDataStd_Integer::Set(myDoc->Main().Father(), 0);
+ // this to avoid creation of integer attribute outside the transaction after undo
+ transactionID();
myDoc->CommitCommand();
}
// close all only if it is really asked, otherwise it can be undoed/redoed
if (theForever) {
+ // flush everything to avoid messages with bad objects
delete myObjs;
myObjs = 0;
if (myDoc->CanClose() == CDM_CCS_OK)
myFeatures.UnBind(aFeaturesIter.Key());
}
aLoop->activateFlushes(isActive);
+ aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED));
aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aKeptFeatures.insert(aFeature);
if (anUpdatedMap.Contains(aFeatureLabel)) {
ModelAPI_EventCreator::get()->sendUpdated(aFeature, anUpdateEvent);
+ if (aFeature->getKind() == "Parameter") { // if parameters are changed, update the results (issue 937)
+ const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aFeature->results();
+ std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
+ for (; aRIter != aResults.cend(); aRIter++) {
+ std::shared_ptr<ModelAPI_Result> aRes = *aRIter;
+ if (aRes->data()->isValid() && !aRes->isDisabled()) {
+ ModelAPI_EventCreator::get()->sendUpdated(aRes, anUpdateEvent);
+ }
+ }
+ }
}
}
}