From 54a5d9072ff0477077caacf9b65dd4a422f79174 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 19 Mar 2020 14:25:13 +0300 Subject: [PATCH] Adapting for OCCT dev (7.5) --- src/CurveCreator/CurveCreator_Utils.cxx | 6 ++++-- src/GEOMGUI/GEOMGUI_OCCSelector.cxx | 7 ++++--- src/OBJECT/GEOM_AISShape.cxx | 7 ++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/CurveCreator/CurveCreator_Utils.cxx b/src/CurveCreator/CurveCreator_Utils.cxx index 4aac8b87f..c0123f7e3 100644 --- a/src/CurveCreator/CurveCreator_Utils.cxx +++ b/src/CurveCreator/CurveCreator_Utils.cxx @@ -620,15 +620,17 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo theContext->SetAutomaticHilight( Standard_False ); Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) ); + const NCollection_Vector& selected = aSelection->Entities(); CurveCreator_ICurve::SectionToPointList::const_iterator anIt = thePoints.begin(), aLast = thePoints.end(); bool isFound = false; for( int i=0; iInit(); aSelection->More(); aSelection->Next() ) + for ( NCollection_Vector::Iterator selIter( selected ); + selIter.More(); selIter.Next() ) { - const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive(); + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = selIter.Value(); if( aHSenEntity.IsNull() ) continue; Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive(); diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index 1be9d9311..b4971833c 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -178,9 +178,10 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, continue; Handle(SelectMgr_Selection) sel = theObj->Selection( m ); - - for ( sel->Init(); sel->More(); sel->Next() ) { - const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive(); + const NCollection_Vector& selected = sel->Entities(); + for ( NCollection_Vector::Iterator selIter( selected ); + selIter.More(); selIter.Next() ) { + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = selIter.Value(); if( aHSenEntity.IsNull() ) continue; diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index abfab4f73..956327ed6 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -99,9 +99,10 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, continue; Handle(SelectMgr_Selection) sel = theObj->Selection( m ); - - for ( sel->Init(); sel->More(); sel->Next() ) { - const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive(); + const NCollection_Vector& selected = sel->Entities(); + for ( NCollection_Vector::Iterator selIter( selected ); + selIter.More(); selIter.Next() ) { + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = selIter.Value(); if( aHSenEntity.IsNull() ) continue; -- 2.39.2