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;
}
}