X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FControls%2FSMESH_Controls.cxx;h=0623399e9dba8246b5958f7f32117d1937ec5324;hp=3f612a24fc823cc2b4750d44f01095709f07ba70;hb=5b3023e6cb8002da05c9cbd36fac7ce1b67bc461;hpb=475d7c1304e733196b4da8b4c083f9c0ae6927d2 diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 3f612a24f..0623399e9 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -3212,14 +3212,13 @@ bool RangeOfIds::SetRangeStr( const TCollection_AsciiString& theStr ) myIds.Clear(); TCollection_AsciiString aStr = theStr; - //aStr.RemoveAll( ' ' ); - //aStr.RemoveAll( '\t' ); for ( int i = 1; i <= aStr.Length(); ++i ) - if ( isspace( aStr.Value( i ))) - aStr.SetValue( i, ','); - - for ( int aPos = aStr.Search( ",," ); aPos != -1; aPos = aStr.Search( ",," ) ) - aStr.Remove( aPos, 1 ); + { + char c = aStr.Value( i ); + if ( !isdigit( c ) && c != ',' && c != '-' ) + aStr.SetValue( i, ' '); + } + aStr.RemoveAll( ' ' ); TCollection_AsciiString tmpStr = aStr.Token( ",", 1 ); int i = 1;