Salome HOME
Enable splitting bi-quad quadrangles by QuadToTri()
[modules/smesh.git] / src / Controls / SMESH_Controls.cxx
index 3f612a24fc823cc2b4750d44f01095709f07ba70..0623399e9dba8246b5958f7f32117d1937ec5324 100644 (file)
@@ -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;