X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FAIS%2FAIS_LocalContext_1.cxx;h=2301294576bf83de684e66fb112a56194a91fd23;hp=c2701f9fee5333671e444898070f7e77ae0b42f0;hb=4ca4bbe8bdb0f54877396ef11b35ca08f3791628;hpb=8cf06aa23686befba2806e908cf0dc37f741b272 diff --git a/src/AIS/AIS_LocalContext_1.cxx b/src/AIS/AIS_LocalContext_1.cxx index c2701f9fee..2301294576 100644 --- a/src/AIS/AIS_LocalContext_1.cxx +++ b/src/AIS/AIS_LocalContext_1.cxx @@ -1455,9 +1455,10 @@ Standard_Integer AIS_LocalContext::HilightPreviousDetected (const Handle(V3d_Vie return 0; } + const Standard_Integer aLen = myDetectedSeq.Length(); if (--myCurDetected < 1) { - myCurDetected = 1; + myCurDetected = aLen; } Handle(SelectMgr_EntityOwner) anOwner = myMainVS->Picked (myDetectedSeq (myCurDetected)); if (anOwner.IsNull())