void ModelAPI_Feature::setResult(const std::shared_ptr<ModelAPI_Result>& theResult)
{
- static Events_Loop* aLoop = Events_Loop::loop();
static Events_ID EVENT_UPD = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
}
// in any case result becomes enabled
theResult->setDisabled(theResult, false);
- // flush vidualisation changes
- static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
- aLoop->flush(aRedispEvent);
}
void ModelAPI_Feature::setResult(const std::shared_ptr<ModelAPI_Result>& theResult,
*aResIter = theResult;
}
theResult->setDisabled(theResult, false);
- // 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::removeResult(const std::shared_ptr<ModelAPI_Result>& theResult)
gp_Pnt aP1;
for (i = 0; i < aNb; i++) {
aObj = anAttrB->object(i);
- if (!aObj.get()) // TODO:empty_result
- // this check should be removed here after the result flush is corrected
- // the problem is, that feature::execute() flushes redisplay by each result creation
- // but it is possible(e.g. in the sketch circle, that there should be more than one result.
- // Here, crash happens, because the second result is not created yet
- continue;
aP1 = aMgr->getPosition(aObj, this, theStep);
myPntArray->SetVertice(i + 1, aP1);
}
for (i = 0; i < aNb; i++) {
aObj = anAttrC->object(i);
- if (!aObj.get()) // TODO:empty_result
- // this check should be removed here after the result flush is corrected
- // the problem is, that feature::execute() flushes redisplay by each result creation
- // but it is possible(e.g. in the sketch circle, that there should be more than one result.
- // Here, crash happens, because the second result is not created yet
- continue;
aP1 = aMgr->getPosition(aObj, this, theStep);
myPntArray->SetVertice(aNb + i + 1, aP1);
}
gp_Pnt aP1;
for (i = 0; i < aNbB; i++) {
aObj = anAttrB->object(i);
- if (!aObj.get()) // TODO:empty_result
- // this check should be removed here after the result flush is corrected
- // the problem is, that feature::execute() flushes redisplay by each result creation
- // but it is possible(e.g. in the sketch circle, that there should be more than one result.
- // Here, crash happens, because the second result is not created yet
- continue;
aP1 = aMgr->getPosition(aObj, this, theStep);
myPntArray->SetVertice(i + 1, aP1);
}