]> OCCT Git - occt-copy.git/commitdiff
0027612: Visualization, AIS_InteractiveContext - handle SelectMgr_EntityOwner::IsForc... CR0_PCVis_AVD
authorvpa <vpa@opencascade.com>
Thu, 16 Jun 2016 13:30:11 +0000 (16:30 +0300)
committervpa <vpa@opencascade.com>
Tue, 18 Oct 2016 12:03:42 +0000 (15:03 +0300)
- the check for IsForcedHilight was added to interactive context

src/AIS/AIS_InteractiveContext_1.cxx

index 9b80e596f6b4aadde3edb412299c465a41d5ddab..066d3d3484337403c2f04a421feb503f81f562d6 100644 (file)
@@ -216,9 +216,14 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo (const Standard_Integer  th
 
   if (aNewDetected >= 1)
   {
-    // does nothing if previously detected object is equal to the current one
+    // Does nothing if previously detected object is equal to the current one.
+    // However in advanced selection modes the owners comparison
+    // is not effective because in that case only one owner manage the
+    // selection in current selection mode. It is necessary to check the current detected
+    // entity and hilight it only if the detected entity is not the same as
+    // previous detected (IsForcedHilight call)
     Handle(SelectMgr_EntityOwner) aNewPickedOwner = myMainSel->Picked (aNewDetected);
-    if (aNewPickedOwner == myLastPicked)
+    if (aNewPickedOwner == myLastPicked && !aNewPickedOwner->IsForcedHilight())
     {
       return myLastPicked->IsSelected()
            ? AIS_SOD_Selected