From 2182812a5bcfb9396208ba8693e89a783a23e474 Mon Sep 17 00:00:00 2001 From: mzernova Date: Fri, 2 Sep 2022 10:43:19 +0300 Subject: [PATCH] 0033112: Visualization - AIS_InteractiveContext::RecomputeSelectionOnly() may should handle selection tolerance changes --- src/AIS/AIS_InteractiveContext.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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()); } -- 2.39.5