]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2670: Update measurement dimension on change the measurement type
authorvsv <vsv@opencascade.com>
Wed, 3 Oct 2018 09:51:21 +0000 (12:51 +0300)
committervsv <vsv@opencascade.com>
Wed, 3 Oct 2018 09:51:21 +0000 (12:51 +0300)
src/XGUI/XGUI_Displayer.cpp

index f0ac7b3b355543ec2d90bf2be69e3955557d619f..7910ec06a677458604f8f7decec0eb1604e80ffb 100644 (file)
@@ -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<Handle(AIS_InteractiveObject)>();
@@ -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);