From: mpv Date: Wed, 2 Jul 2014 07:27:01 +0000 (+0400) Subject: Added the redisplay event X-Git-Tag: V_0.4.4~212 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f0f782e6842e80120cdd0f4add2bb55720163e1;p=modules%2Fshaper.git Added the redisplay event --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index e1f52a9bb..6c8bd6431 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -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 theFeature) @@ -77,6 +80,8 @@ bool Model_Update::updateFeature(boost::shared_ptr 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; diff --git a/src/ModelAPI/ModelAPI_Events.h b/src/ModelAPI/ModelAPI_Events.h index 5ab3df1dc..c65d717e8 100644 --- a/src/ModelAPI/ModelAPI_Events.h +++ b/src/ModelAPI/ModelAPI_Events.h @@ -15,14 +15,16 @@ 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 {