]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To show notebook variables in the Object Browser.
authorrnv <rnv@opencascade.com>
Sat, 1 Nov 2008 12:56:37 +0000 (12:56 +0000)
committerrnv <rnv@opencascade.com>
Sat, 1 Nov 2008 12:56:37 +0000 (12:56 +0000)
src/SalomeApp/SalomeApp_DataObject.cxx

index c78e285200499db238bbecebfc843aa13f2195a0..c1a292ddcaa89c174db119d06891196574d23b4b 100644 (file)
@@ -445,7 +445,21 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const
   {
     _PTR(AttributeString) strAttr = attr;
     std::string str = strAttr->Value();
-    val = QString( str.c_str() );
+    QString aStrings = QString( str.c_str() );
+    
+    //Special case to show NoteBook variables in the "Value" column of the OB 
+    QStringList aStringList = aStrings.split(":");
+    if(aStringList.size() > 0) {
+      int i = 0;
+      for (;i<aStringList.size();i++){
+        if(!aStringList[i].isEmpty())
+          val.append(aStringList[i]+", ");
+      }
+      if(!val.isEmpty())
+        val.remove(val.length()-2,2);
+    }
+    else
+      val = aStrings;
   }
   else if ( obj->FindAttribute( attr, "AttributeInteger" ) )
   {