Fix RemoveOrphanNodes() to return valid nb of removed nodes

This commit is contained in:
eap 2012-01-26 11:06:16 +00:00
parent a7d76b7825
commit b4e2459e13

View 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;
}
//=============================================================================