Salome HOME
The selections of elements corrected.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddMeshElementDlg.cxx
index 8226cdc6a7470801d4f96923479c78c8ed2aedb7..263758674743da0150dcd5bab341b388efbd2d5e 100644 (file)
@@ -524,28 +524,20 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
     aMesh = myActor->GetObject()->GetMesh();
 
   if (aMesh) {
     aMesh = myActor->GetObject()->GetMesh();
 
   if (aMesh) {
-    SALOME_ListIO aList; aList.Append( myActor->getIO() );
-    mySelectionMgr->setSelectedObjects( aList, false );
-
-    TColStd_IndexedMapOfInteger selectedIndices;
     TColStd_MapOfInteger newIndices;
     TColStd_MapOfInteger newIndices;
-    mySelector->GetIndex(myActor->getIO(), selectedIndices);
-
+    
     QStringList aListId = QStringList::split(" ", theNewText, false);
     for (int i = 0; i < aListId.count(); i++) {
       if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
       {
     QStringList aListId = QStringList::split(" ", theNewText, false);
     for (int i = 0; i < aListId.count(); i++) {
       if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
       {
-       if( selectedIndices.Add( n->GetID() ) )
-         newIndices.Add( n->GetID() );
+       newIndices.Add( n->GetID() );
        myNbOkNodes++;
       }
     }
     
        myNbOkNodes++;
       }
     }
     
-    if( newIndices.Extent()>0 )
-    {
-      mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, true );
-      myViewWindow->highlight( myActor->getIO(), true, true );
-    }
+    mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
+    myViewWindow->highlight( myActor->getIO(), true, true );
+    
     bool aNodesOK = false;
     if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
       myNbOkNodes = aListId.count();
     bool aNodesOK = false;
     if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
       myNbOkNodes = aListId.count();