From: mpv Date: Fri, 7 Dec 2018 15:24:55 +0000 (+0300) Subject: Make "SetColor" operation in GUI works immediately. X-Git-Tag: End2018~102 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddafeff577ef83a0c933e98b66bb39f57b99eaa5;p=modules%2Fshaper.git Make "SetColor" operation in GUI works immediately. --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index e3db137e0..95901d380 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2216,6 +2216,9 @@ void setColor(ResultPtr theResult, const std::vector& theColor) aColorAttr->setValue(1, theColor[1]); aColorAttr->setValue(2, theColor[2]); } + static const Events_ID kRedisplayEvent = + Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY); + ModelAPI_EventCreator::get()->sendUpdated(theResult, kRedisplayEvent); } //************************************************************** @@ -2294,6 +2297,9 @@ void setDeflection(ResultPtr theResult, const double theDeflection) AttributeDoublePtr aDeflectionAttr = theResult->data()->real(ModelAPI_Result::DEFLECTION_ID()); if (aDeflectionAttr.get() != NULL) aDeflectionAttr->setValue(theDeflection); + static const Events_ID kRedisplayEvent = + Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY); + ModelAPI_EventCreator::get()->sendUpdated(theResult, kRedisplayEvent); } //************************************************************** @@ -2305,6 +2311,9 @@ void setTransparency(ResultPtr theResult, double theTransparency) AttributeDoublePtr anAttribute = theResult->data()->real(ModelAPI_Result::TRANSPARENCY_ID()); if (anAttribute.get() != NULL) anAttribute->setValue(theTransparency); + static const Events_ID kRedisplayEvent = + Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY); + ModelAPI_EventCreator::get()->sendUpdated(theResult, kRedisplayEvent); } //**************************************************************