+ if (nbSel != 1) {
+ //check if all selected objects belongs to one mesh
+ SALOME_ListIteratorOfListIO io( aList );
+ for (io.Next(); io.More(); io.Next() ) {
+ SMESH::SMESH_Mesh_var mesh = SMESH::GetMeshByIO(io.Value());
+ if (!mesh->_is_nil() && !mesh->_is_equivalent( myMesh ))
+ return;
+ }
+ // select IO with any element selected (for case of selection by rectangle)
+ IO.Nullify();
+ for (io.Initialize(aList); io.More() && IO.IsNull(); io.Next() )
+ if ( mySelector->HasIndex( io.Value() ))
+ IO = io.Value();
+ if ( IO.IsNull() ) return;
+ // unhilight others
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) {
+ for (io.Initialize(aList); io.More(); io.Next() )
+ if ( !IO->isSame( io.Value() ))
+ aViewWindow->highlight( io.Value(), false, true );
+ }
+ }
+