1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029724: Visualization - add AIS_InteractiveContext::ClearDetected() undoing MoveTo() dynamic highlighting

Introduced new method AIS_InteractiveContext::ClearDetected() allowing
to reset the list of detected objects and clear dynamically highlighted
entity under mouse cursor after previous AIS_InteractiveContext::MoveTo().

vmoveto command has been extended with new argument -reset.
This commit is contained in:
kgv
2018-04-25 11:38:11 +03:00
committed by abv
parent be480fe752
commit 8a5905801c
6 changed files with 117 additions and 39 deletions

View File

@@ -2491,6 +2491,33 @@ void AIS_InteractiveContext::ClearGlobalPrs (const Handle(AIS_InteractiveObject)
}
}
//=======================================================================
//function : ClearDetected
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::ClearDetected (Standard_Boolean theToRedrawImmediate)
{
myCurDetected = 0;
myCurHighlighted = 0;
myDetectedSeq.Clear();
myLastPicked = myLastinMain;
myWasLastMain = Standard_True;
Standard_Boolean toUpdate = Standard_False;
if (!myLastPicked.IsNull() && myLastPicked->HasSelectable())
{
toUpdate = Standard_True;
clearDynamicHighlight();
}
myLastinMain.Nullify();
myLastPicked.Nullify();
myMainSel->ClearPicked();
if (toUpdate && theToRedrawImmediate)
{
myMainVwr->RedrawImmediate();
}
return toUpdate;
}
//=======================================================================
//function : DrawHiddenLine
//purpose :