]> OCCT Git - occt-copy.git/commitdiff
0030728: Visualization - using one implementation of highlight/unhighlight in context...
authornds <nds@opencascade.com>
Tue, 11 Jun 2019 11:24:23 +0000 (14:24 +0300)
committernds <nds@opencascade.com>
Tue, 11 Jun 2019 11:24:23 +0000 (14:24 +0300)
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext_1.cxx

index 3f33ce13ed99e48f0a4706d8d9f98c062ff013b3..4adacccee4ff57d4741b5f1c83797e7e3726d694 100644 (file)
@@ -1944,7 +1944,9 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
   }
 
   const Standard_Integer aDispMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
-  unhighlightOwners (theIObj);
+  AIS_NListOfEntityOwner anOwners;
+  anOwners.Append(theIObj->GlobalSelOwner());
+  unhighlightOwners (anOwners);
   myMainPM->SetVisibility (theIObj, aStatus->DisplayMode(), Standard_False);
 
   if (!myLastPicked.IsNull()
index 1901b14f217fde0ddea4733366b586246005e1dc..fe5cebd0805deb377eef80660e918321d2e6399e 100644 (file)
@@ -501,17 +501,17 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const TColgp_Array1OfPnt2d& the
 AIS_StatusOfPick AIS_InteractiveContext::Select (const AIS_SelectionScheme theSelScheme)
 {
   // special case: single selection of detected owner - is it necessary ?
-  /*if (myWasLastMain && !myLastinMain.IsNull() && !myAutoHilight &&
-      (myLastinMain->IsSelected()
-      && !myLastinMain->IsForcedHilight()
+  /*if (myWasLastMain && !myLastPicked.IsNull() && !myAutoHilight &&
+      (myLastPicked->IsSelected()
+      && !myLastPicked->IsForcedHilight()
       && NbSelected() <= 1))
   {
-    mySelection->selectOwner(myLastinMain, aPrevSelected, SelectionScheme (AIS_SelectionType_Select));
+    mySelection->selectOwner(myLastPicked, aPrevSelected, SelectionScheme (AIS_SelectionType_Select));
     return getStatusOfPick (NbSelected());
   }*/
 
   AIS_NListOfEntityOwner aPickedOwners;
-  aPickedOwners.Append (myLastinMain);
+  aPickedOwners.Append (myLastPicked);
 
   return Select (aPickedOwners, theSelScheme);
 }