]> OCCT Git - occt-copy.git/commitdiff
0026153: Draw Harness, ViewerTest - "verase" does not remove selection highlight...
authorisk <isk@opencascade.com>
Thu, 14 May 2015 14:04:15 +0000 (17:04 +0300)
committerabv <abv@opencascade.com>
Fri, 11 Sep 2015 16:04:14 +0000 (19:04 +0300)
src/AIS/AIS_InteractiveContext.cxx

index a0a1556dc564299e602868b6aefc27166ca58ff3..46b6050525c069dc0922f9c4233582ea503c4e6b 100644 (file)
@@ -2333,9 +2333,16 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
 
   for (TColStd_ListIteratorOfListOfInteger aDispModeIter (aStatus->DisplayedModes()); aDispModeIter.More(); aDispModeIter.Next())
   {
-    if (myMainPM->IsHighlighted (theIObj, aDispModeIter.Value()))
+    if (aStatus->IsHilighted())
     {
-      myMainPM->Unhighlight (theIObj, aDispModeIter.Value());
+      if (IsCurrent (theIObj))
+      {
+        AddOrRemoveCurrentObject (theIObj, Standard_False);
+      }
+      else if (myMainPM->IsHighlighted (theIObj, aDispModeIter.Value()))
+      {
+        myMainPM->Unhighlight (theIObj, aDispModeIter.Value());
+      }
     }
 
     myMainPM->SetVisibility (theIObj, aDispModeIter.Value(), Standard_False);