]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix RemoveOrphanNodes() to return valid nb of removed nodes
authoreap <eap@opencascade.com>
Thu, 26 Jan 2012 11:06:16 +0000 (11:06 +0000)
committereap <eap@opencascade.com>
Thu, 26 Jan 2012 11:06:16 +0000 (11:06 +0000)
src/SMESH_I/SMESH_MeshEditor_i.cxx

index 448eef042c0a014d8b3d98be969ac156dad118a7..ee6499cb0564f4a23268ca34e667d610fa1c28bf 100644 (file)
@@ -531,12 +531,14 @@ CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes()
   for ( int i = 0; i < seq.size(); i++ )
     IdList.push_back( seq[i] );
 
-  bool ret = anEditor.Remove( IdList, true );
+  int nbNodesBefore = myMesh->NbNodes();
+  anEditor.Remove( IdList, true );
   myMesh->GetMeshDS()->Modified();
   if ( IdList.size() )
     myMesh->SetIsModified( true );
+  int nbNodesAfter = myMesh->NbNodes();
 
-  return ret;
+  return nbNodesBefore - nbNodesAfter;
 }
 
 //=============================================================================