]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
The selections of elements corrected.
authormzn <mzn@opencascade.com>
Fri, 24 Jun 2005 12:42:50 +0000 (12:42 +0000)
committermzn <mzn@opencascade.com>
Fri, 24 Jun 2005 12:42:50 +0000 (12:42 +0000)
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx

index b4d4a70c7252f0e4faa532eb401dcb5572b8e38a..b65bd3c3e1906f783ea7c6bd00bb8c044f6b0080 100644 (file)
@@ -698,9 +698,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
       QStringList aListId = QStringList::split(" ", theNewText, false);
       bool bOk;
       const Handle(SALOME_InteractiveObject)& anIO = myMeshActor->getIO();
-      TColStd_IndexedMapOfInteger selectedIndices;
       TColStd_MapOfInteger newIndices;
-      mySelector->GetIndex(anIO, selectedIndices);
       for (int i = 0; i < aListId.count(); i++) {
        long ind = aListId[ i ].toLong(&bOk);
        if (bOk) {
@@ -709,18 +707,13 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
            // check also type of element
            bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
                             Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
-           if (typeMatch) {
-             if (selectedIndices.Add(e->GetID())) {
-                newIndices.Add(e->GetID());
-              }
-           }
+           if (typeMatch)
+             newIndices.Add(e->GetID());
          }
        }
       }
-      if (newIndices.Extent() > 0) {
-        mySelector->AddOrRemoveIndex(anIO, newIndices, true);
-       myViewWindow->highlight( anIO, true, true );
-      }
+      mySelector->AddOrRemoveIndex(anIO, newIndices, false);
+      myViewWindow->highlight( anIO, true, true );
     }
   } else if (send == StartPointLineEdit &&
              myEditCurrentArgument == StartPointLineEdit) {
@@ -742,14 +735,10 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
          const SMDS_MeshNode* n = aMesh->FindNode(ind);
          if (n) {
            //if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
-            TColStd_IndexedMapOfInteger selectedIndices;
             TColStd_MapOfInteger newIndices;
-            mySelector->GetIndex(aPathActor->getIO(), selectedIndices);
-            if (selectedIndices.Add(n->GetID())) {
-              newIndices.Add(n->GetID());
-             mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, true );
-             myViewWindow->highlight( aPathActor->getIO(), true, true );
-           }
+           newIndices.Add(n->GetID());
+           mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
+           myViewWindow->highlight( aPathActor->getIO(), true, true );
          }
        }
       }