Salome HOME
Rollback the correction of parser of commands like object.command(obj, 'str=value...
authorakl <akl@opencascade.com>
Fri, 5 Dec 2008 14:38:51 +0000 (14:38 +0000)
committerakl <akl@opencascade.com>
Fri, 5 Dec 2008 14:38:51 +0000 (14:38 +0000)
src/SMESH_I/SMESH_2smeshpy.cxx

index 1a7341c7028afd359ee926922232744d47ae151a..2277fc967f5e7ab4a917c295c6d299d0288f92cc 100644 (file)
@@ -1712,22 +1712,8 @@ const TCollection_AsciiString & _pyCommand::GetObject()
   {
     // beginning
     int begPos = GetBegPos( RESULT_IND ) + myRes.Length();
-    if ( begPos < 1 ) {
+    if ( begPos < 1 )
       begPos = myString.Location( "=", 1, Length() ) + 1;
-      // is '=' in the string argument (for example, name) or not
-      int nb1 = 0; // number of ' character at the left of =
-      int nb2 = 0; // number of " character at the left of =
-      for ( int i = 1; i < begPos-1; i++ ) {
-       if ( IsEqual(myString.Value( i ), "'" ) )
-         nb1 += 1;
-       else if ( IsEqual( myString.Value( i ), '"' ) )
-         nb2 += 1;
-      }
-      // if number of ' or " is not divisible by 2,
-      // then get an object at the start of the command
-      if ( fmod( nb1, 2 ) != 0 || fmod( nb2, 2 ) != 0 )
-       begPos = 1;
-    }
     // store
     myObj = GetWord( myString, begPos, true );
     SetBegPos( OBJECT_IND, begPos );