From: isk Date: Thu, 14 May 2015 14:04:15 +0000 (+0300) Subject: 0026153: Draw Harness, ViewerTest - "verase" does not remove selection highlight... X-Git-Tag: V6_9_1~32 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=46b15b82751b5b203377bbbdc15680b40d759c37;p=occt-copy.git 0026153: Draw Harness, ViewerTest - "verase" does not remove selection highlight for shaded object --- diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index a0a1556dc5..46b6050525 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -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);