]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Added the redisplay event
authormpv <mikhail.ponikarov@opencascade.com>
Wed, 2 Jul 2014 07:27:01 +0000 (11:27 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Wed, 2 Jul 2014 07:27:01 +0000 (11:27 +0400)
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_Events.h

index e1f52a9bbe4b8ecf8fff44cb7da299abc4a68653..6c8bd6431d3d9a085d069f5791f9209105f176b2 100644 (file)
@@ -42,6 +42,9 @@ void Model_Update::processEvent(const Events_Message* theMessage)
     }
   }
   myUpdated.clear();
+  // flush
+  static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_FEATURE_TO_REDISPLAY);
+  Events_Loop::loop()->flush(EVENT_DISP);
 }
 
 bool Model_Update::updateFeature(boost::shared_ptr<ModelAPI_Feature> theFeature)
@@ -77,6 +80,8 @@ bool Model_Update::updateFeature(boost::shared_ptr<ModelAPI_Feature> theFeature)
   bool anExecute = aMustbeUpdated || myInitial.find(theFeature) != myInitial.end();
   if (anExecute) {
     theFeature->execute();
+    static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_FEATURE_TO_REDISPLAY);
+    ModelAPI_EventCreator::get()->sendUpdated(theFeature, EVENT_DISP);
   }
   myUpdated[theFeature] = anExecute;
   return anExecute;
index 5ab3df1dc0bd5137f75febfe9ac84b8a873c1160..c65d717e85a228dd77809b896d139679bf3205d4 100644 (file)
 
 class ModelAPI_Document;
 
-/// Event ID that feature is created (comes with Model_FeatureUpdatedMessage)
+/// Event ID that feature is created (comes with ModelAPI_FeatureUpdatedMessage)
 static const char * EVENT_FEATURE_CREATED = "FeatureCreated";
 /// Event ID that data of feature is updated (comes with Model_FeatureUpdatedMessage)
 static const char * EVENT_FEATURE_UPDATED = "FeatureUpdated";
 /// Event ID that data of feature is deleted (comes with Model_FeatureDeletedMessage)
 static const char * EVENT_FEATURE_DELETED = "FeatureDeleted";
-/// Event ID that data of feature is updated (comes with Model_FeaturesMovedMessage)
+/// Event ID that data of feature is updated (comes with ModelAPI_FeatureUpdatedMessage)
 static const char * EVENT_FEATURE_MOVED = "FeaturesMoved";
+/// Event ID that visualization must be redisplayed (comes with ModelAPI_FeatureUpdatedMessage)
+static const char * EVENT_FEATURE_TO_REDISPLAY = "FeaturesToRedisplay";
 
 /// Message that feature was changed (used for Object Browser update): moved, updated and deleted
 class ModelAPI_FeatureUpdatedMessage : public Events_MessageGroup {