From: mpv Date: Tue, 29 Jul 2014 06:47:45 +0000 (+0400) Subject: Debug of opening document with sketch X-Git-Tag: V_0.4.4~136^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a2e82b6ec9945c11a57dd63559bef2f219f4abe;p=modules%2Fshaper.git Debug of opening document with sketch --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index a50f19c6a..070e5a8c0 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -24,6 +24,8 @@ Model_Update::Model_Update() 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(theMessage); myInitial = aMsg->objects(); @@ -48,6 +50,7 @@ void Model_Update::processEvent(const Events_Message* theMessage) // 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) diff --git a/src/Model/Model_Update.h b/src/Model/Model_Update.h index f96bbf8ad..e5851910f 100644 --- a/src/Model/Model_Update.h +++ b/src/Model/Model_Update.h @@ -24,6 +24,8 @@ class Model_Update : public Events_Listener std::set > myInitial; ///< already updated and processed features and modificated feature flag std::map, 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();