]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Debug of opening document with sketch
authormpv <mikhail.ponikarov@opencascade.com>
Tue, 29 Jul 2014 06:47:45 +0000 (10:47 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Tue, 29 Jul 2014 06:47:45 +0000 (10:47 +0400)
src/Model/Model_Update.cpp
src/Model/Model_Update.h

index a50f19c6a2ba91767aee44ca7ad51e17b4b03349..070e5a8c09f37f9a723ec0ba7d28c9ba222481ff 100644 (file)
@@ -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<const ModelAPI_ObjectUpdatedMessage*>(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)
index f96bbf8adaed2c069f054122de127c2d699907ff..e5851910fd94d8e4646c72d0149bf6575e5c06f4 100644 (file)
@@ -24,6 +24,8 @@ class Model_Update : public Events_Listener
   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();