theOwner->HilightWithColor (myMainPM, myStyles[Prs3d_TypeOfHighlight_SubIntensity], theMode);
}
+//=======================================================================
+//function : isSlowHiStyle
+//purpose :
+//=======================================================================
+Standard_Boolean AIS_InteractiveContext::isSlowHiStyle (const Handle(SelectMgr_EntityOwner)& theOwner,
+ const Handle(V3d_Viewer)& theViewer) const
+{
+ if (const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable()))
+ {
+ const Handle(Prs3d_Drawer)& aHiStyle = getHiStyle (anObj, myLastPicked);
+ return aHiStyle->ZLayer() == Graphic3d_ZLayerId_UNKNOWN
+ || !theViewer->ZLayerSettings (aHiStyle->ZLayer()).IsImmediate();
+ }
+ return Standard_False;
+}
+
//=======================================================================
//function : MoveTo
//purpose :
// method call. As result it is necessary to rehighligt it with mySelectionColor.
if (!myLastPicked.IsNull() && myLastPicked->HasSelectable())
{
+ if (isSlowHiStyle (myLastPicked, theView->Viewer()))
+ {
+ theView->Viewer()->Invalidate();
+ }
+
clearDynamicHighlight();
toUpdateViewer = Standard_True;
}
&& (!myLastPicked->IsSelected()
|| myToHilightSelected))
{
+ if (isSlowHiStyle (myLastPicked, theView->Viewer()))
+ {
+ theView->Viewer()->Invalidate();
+ }
+
highlightWithColor (myLastPicked, theView->Viewer());
toUpdateViewer = Standard_True;
}
&& !myLastPicked.IsNull()
&& myLastPicked->HasSelectable())
{
+ if (isSlowHiStyle (myLastPicked, theView->Viewer()))
+ {
+ theView->Viewer()->Invalidate();
+ }
+
clearDynamicHighlight();
toUpdateViewer = Standard_True;
}
}
else
{
- theView->Viewer()->RedrawImmediate();
+ if (theView->IsInvalidated())
+ {
+ theView->Viewer()->Redraw();
+ }
+ else
+ {
+ theView->Viewer()->RedrawImmediate();
+ }
}
}