void Model_Update::processEvent(const Events_Message* theMessage)
{
+ if (isExecuted) return; // nothing to do: it is executed now
+ isExecuted = true;
const ModelAPI_ObjectUpdatedMessage* aMsg =
dynamic_cast<const ModelAPI_ObjectUpdatedMessage*>(theMessage);
myInitial = aMsg->objects();
// flush
static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
Events_Loop::loop()->flush(EVENT_DISP);
+ isExecuted = false;
}
bool Model_Update::updateFeature(FeaturePtr theFeature)
std::set<boost::shared_ptr<ModelAPI_Object> > myInitial;
///< already updated and processed features and modificated feature flag
std::map<boost::shared_ptr<ModelAPI_Object>, bool> myUpdated;
+ ///< to know that all next updates are caused by this execution
+ bool isExecuted;
public:
/// Is called only once, on startup of the application
Model_Update();