+ // flush visualisation changes
+ static Events_Loop* aLoop = Events_Loop::loop();
+ static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
+ aLoop->flush(aRedispEvent);
+}
+
+void ModelAPI_Feature::eraseResultFromList(const std::shared_ptr<ModelAPI_Result>& theResult)
+{
+ std::list<std::shared_ptr<ModelAPI_Result> >::iterator aResIter = myResults.begin();
+ for(; aResIter != myResults.end(); aResIter++) {
+ ResultPtr aRes = *aResIter;
+ if (aRes == theResult) {
+ std::string aGroup = aRes->groupName();
+ aRes->setDisabled(aRes, true); // for complex results to disable all subs
+ aRes->data()->erase();
+ myResults.erase(aResIter);
+
+ static Events_Loop* aLoop = Events_Loop::loop();
+ static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
+ static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
+ aECreator->sendDeleted(document(), aGroup);
+ aECreator->sendUpdated(aRes, EVENT_DISP);
+ break;
+ }
+ }