- Handle(AIS_InteractiveContext) c = getContext();
- if( !c.IsNull() )
- {
- for( c->InitSelected(); c->MoreSelected(); c->NextSelected() )
- {
- Handle(HYDROGUI_BathymetryPointOwner) anOwner =
- Handle(HYDROGUI_BathymetryPointOwner)::DownCast( c->SelectedOwner() );
- if( !anOwner.IsNull() && anOwner->Selectable()==obj )
- selected.append( anOwner->GetIndex() );
- }
- }
+ Handle(HYDROGUI_BathymetryPrs) aPntCloud = Handle(HYDROGUI_BathymetryPrs)::DownCast( getAISObjects()[0] );
+ if (!aPntCloud.IsNull())
+ selected = aPntCloud->getSelectedPoints();
+ DEBTRACE("selected " << selected.size());