From 0ac0733ed23d06b3eec47e2dde698b843eee5c2e Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 1 Dec 2008 10:55:59 +0000 Subject: [PATCH] Dump Python extension --- src/SalomeApp/SalomeApp_DataObject.cxx | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index 6a8ecc65c..acab0953a 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -453,21 +453,28 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const if ( SalomeApp_Study* aStudy = dynamic_cast( 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; } } -- 2.39.2