From: vsv Date: Wed, 3 Oct 2018 09:51:21 +0000 (+0300) Subject: Issue #2670: Update measurement dimension on change the measurement type X-Git-Tag: CEA_2018-2~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f941e6126c9bd521e1e7e67afdd6dc60e5865438;p=modules%2Fshaper.git Issue #2670: Update measurement dimension on change the measurement type --- diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index f0ac7b3b3..7910ec06a 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -342,6 +342,7 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer) return aRedisplayed; } if (aAIS_Obj != aAISObj) { + erase(theObject, theUpdateViewer); appendResultObject(theObject, aAIS_Obj); } aAISIO = aAIS_Obj->impl(); @@ -385,7 +386,10 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer) #ifdef CLEAR_OUTDATED_SELECTION_BEFORE_REDISPLAY myWorkshop->selector()->deselectPresentation(aAISIO); #endif - aContext->Redisplay(aAISIO, false); + if (aContext->IsDisplayed(aAISIO)) + aContext->Redisplay(aAISIO, false); + else + aContext->Display(aAISIO, false); #ifdef TINSPECTOR if (getCallBack()) getCallBack()->Redisplay(aAISIO);