0028047: Visualization - support objects with customized highlighting in AIS_Interact...
[occt.git] / src / AIS / AIS_InteractiveContext.cxx
index 1acdb93..0a56d2e 100644 (file)
@@ -2353,7 +2353,7 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
   if (!myLastPicked.IsNull()
     && myLastPicked->IsSameSelectable (theIObj))
   {
-    myMainPM->ClearImmediateDraw();
+    clearDynamicHighlight();
   }
 
   if (IsSelected (theIObj)
@@ -2447,8 +2447,8 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
     if (myLastinMain->IsSameSelectable (theIObj)
      || myLastPicked->IsSameSelectable(theIObj))
     {
+      clearDynamicHighlight();
       myLastinMain.Nullify();
-      myMainPM->ClearImmediateDraw();
     }
   }