mySubintStyle(new Graphic3d_HighlightStyle (Aspect_TOHM_COLOR, Quantity_NOC_GRAY40)),
myDisplayMode(0),
myCurLocalIndex(0),
-myAISCurDetected(0),
+myCurDetected(0),
+myCurHighlighted(0),
myZDetectionFlag(0),
myIsAutoActivateSelMode(Standard_True)
{
// to its highlight structure immediately
if (!myLastPicked.IsNull() && myLastPicked->IsSameSelectable (theIObj))
{
+ const Standard_Integer aHiMod = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
myLastPicked->UpdateHighlightTrsf (myMainVwr,
myMainPM,
- theIObj->HasDisplayMode() ? theIObj->DisplayMode() : 0);
+ aHiMod);
}
}
myMainPM->Erase (theIObj, -1);
// Object removes from Detected sequence
- for(Standard_Integer aDetIter = 1; aDetIter < myAISDetectedSeq.Length(); ++aDetIter)
+ for (Standard_Integer aDetIter = myDetectedSeq.Lower(); aDetIter <= myDetectedSeq.Upper(); ++aDetIter)
{
Handle(AIS_InteractiveObject) anObj = DetectedCurrentObject();
if (!anObj.IsNull()
&& anObj != theIObj)
{
- myAISDetectedSeq.Remove (aDetIter);
+ myDetectedSeq.Remove (aDetIter);
}
}
aDefViewIter.Value()->View()->ChangeHiddenObjects()->Remove (theIObj.get());
}
- if (!myLastinMain.IsNull() && myLastinMain->IsSameSelectable (theIObj))
- myLastinMain.Nullify();
- if (!myLastPicked.IsNull() && myLastPicked->IsSameSelectable (theIObj))
- myLastPicked.Nullify();
- myMainPM->ClearImmediateDraw();
+ if (!myLastinMain.IsNull())
+ {
+ if (myLastinMain->IsSameSelectable (theIObj)
+ || myLastPicked->IsSameSelectable(theIObj))
+ {
+ myLastinMain.Nullify();
+ myMainPM->ClearImmediateDraw();
+ }
+ }
if (theToUpdateviewer && aStatus->GraphicStatus() == AIS_DS_Displayed)
{