From b4e2459e139f1cc9257bb4cfb20dda80afdeabf8 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 26 Jan 2012 11:06:16 +0000 Subject: [PATCH] Fix RemoveOrphanNodes() to return valid nb of removed nodes --- src/SMESH_I/SMESH_MeshEditor_i.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } //============================================================================= -- 2.39.2