}
}
-void XGUI_ViewerProxy::eraseHighlight()
+bool XGUI_ViewerProxy::eraseHighlight()
{
Handle(AIS_InteractiveContext) aContext = AISContext();
Handle(AIS_InteractiveObject) anAISIO;
AIS_ListIteratorOfListOfInteractive aLIt;
+ bool isErased = myHighlights.Extent() > 0;
for (aLIt.Initialize(myHighlights); aLIt.More(); aLIt.Next()) {
anAISIO = aLIt.Value();
aContext->Remove(anAISIO, false);
}
myHighlights.Clear();
+ return isErased;
}
void XGUI_ViewerProxy::updateHighlight()
}
}
if (!isDisplayed) {
- eraseHighlight();
- aContext->UpdateCurrentViewer();
+ if (eraseHighlight()) {
+ aContext->UpdateCurrentViewer();
+ }
myResult = ResultPtr();
}
}