From: mzernova Date: Fri, 2 Sep 2022 07:43:19 +0000 (+0300) Subject: 0033112: Visualization - AIS_InteractiveContext::RecomputeSelectionOnly() may should... X-Git-Tag: V7_7_0_beta~22 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=2182812a5bcfb9396208ba8693e89a783a23e474;p=occt.git 0033112: Visualization - AIS_InteractiveContext::RecomputeSelectionOnly() may should handle selection tolerance changes --- diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 8bd2d868c4..04d50baf78 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -1,4 +1,4 @@ -// Created on: 1997-01-17 +// Created on: 1997-01-17 // Created by: Robert COUBLANC // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS @@ -1001,6 +1001,14 @@ void AIS_InteractiveContext::RecomputeSelectionOnly (const Handle(AIS_Interactiv return; } + TColStd_ListOfInteger aModes; + ActivatedModes (theIO, aModes); + + for (TColStd_ListIteratorOfListOfInteger aModesIter (aModes); aModesIter.More(); aModesIter.Next()) + { + mgrSelector->Deactivate (theIO, aModesIter.Value()); + } + mgrSelector->RecomputeSelection (theIO); const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theIO); @@ -1010,10 +1018,7 @@ void AIS_InteractiveContext::RecomputeSelectionOnly (const Handle(AIS_Interactiv return; } - TColStd_ListOfInteger aModes; - ActivatedModes (theIO, aModes); - TColStd_ListIteratorOfListOfInteger aModesIter (aModes); - for (; aModesIter.More(); aModesIter.Next()) + for (TColStd_ListIteratorOfListOfInteger aModesIter (aModes); aModesIter.More(); aModesIter.Next()) { mgrSelector->Activate (theIO, aModesIter.Value()); }