From: eap Date: Thu, 26 Jan 2012 11:06:16 +0000 (+0000) Subject: Fix RemoveOrphanNodes() to return valid nb of removed nodes X-Git-Tag: V6_5_0a1~174 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4e2459e139f1cc9257bb4cfb20dda80afdeabf8;p=modules%2Fsmesh.git Fix RemoveOrphanNodes() to return valid nb of removed nodes --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 448eef042..ee6499cb0 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -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; } //=============================================================================