From f9778348a4035f6772eaca55c820778aae682e1b Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 11 Jun 2019 14:24:23 +0300 Subject: [PATCH] 0030728: Visualization - using one implementation of highlight/unhighlight in context - compilation correction --- src/AIS/AIS_InteractiveContext.cxx | 4 +++- src/AIS/AIS_InteractiveContext_1.cxx | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 3f33ce13ed..4adacccee4 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -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() diff --git a/src/AIS/AIS_InteractiveContext_1.cxx b/src/AIS/AIS_InteractiveContext_1.cxx index 1901b14f21..fe5cebd080 100644 --- a/src/AIS/AIS_InteractiveContext_1.cxx +++ b/src/AIS/AIS_InteractiveContext_1.cxx @@ -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); } -- 2.39.5