From f941e6126c9bd521e1e7e67afdd6dc60e5865438 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 3 Oct 2018 12:51:21 +0300 Subject: [PATCH] Issue #2670: Update measurement dimension on change the measurement type --- src/XGUI/XGUI_Displayer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.2