]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Dump Python extension
authorouv <ouv@opencascade.com>
Mon, 1 Dec 2008 10:55:59 +0000 (10:55 +0000)
committerouv <ouv@opencascade.com>
Mon, 1 Dec 2008 10:55:59 +0000 (10:55 +0000)
src/SalomeApp/SalomeApp_DataObject.cxx

index 6a8ecc65c1d2658f004d299e64993c4ffb45a926..acab0953a1d2d3f95100ea9bd9e6ccc163f11840 100644 (file)
@@ -453,21 +453,28 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const
       if ( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( aRoot->study() ) )
       {
         _PTR(Study) studyDS( aStudy->studyDS() );
-       
-       QStringList aStringList = aStrings.split( QRegExp( "[:|]" ) );
-       if ( !aStringList.isEmpty() )
+
+       bool ok = false;
+       QStringList aSectionList = aStrings.split( "|" );
+       if ( !aSectionList.isEmpty() )
        {
-         for ( int i = 0, n = aStringList.size(); i < n; i++ )
+         QString aLastSection = aSectionList.last();
+         QStringList aStringList = aLastSection.split( ":" );
+         if ( !aStringList.isEmpty() )
          {
-           QString aStr = aStringList[i];
-           if ( studyDS->IsVariable( aStr.toStdString() ) )
-             val.append( aStr + ", " );
+           ok = true;
+           for ( int i = 0, n = aStringList.size(); i < n; i++ )
+           {
+             QString aStr = aStringList[i];
+             if ( studyDS->IsVariable( aStr.toStdString() ) )
+               val.append( aStr + ", " );
+           }
+
+           if ( !val.isEmpty() )
+             val.remove( val.length() - 2, 2 );
          }
-
-         if ( !val.isEmpty() )
-           val.remove( val.length() - 2, 2 );
        }
-       else
+       if( !ok )
          val = aStrings;
       }
     }