]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Show name of the object in the tooltip in addition to object info; useful when long...
authorvsr <vsr@opencascade.com>
Fri, 15 May 2015 14:05:02 +0000 (17:05 +0300)
committervsr <vsr@opencascade.com>
Fri, 15 May 2015 14:05:02 +0000 (17:05 +0300)
src/SalomeApp/SalomeApp_DataObject.cxx

index 055848b85d66e1db16cc28458eece1e5ec468971..dd70f87f5581ef9e3ef9d97348f8c2445c7a9320 100644 (file)
@@ -290,8 +290,15 @@ QString SalomeApp_DataObject::toolTip( const int /*id*/ ) const
       
       if ( !CORBA::is_nil(aComponent) && aComponent->hasObjectInfo() ) {
         LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
-        if ( aRoot && aRoot->study() )
-          return QString( (CORBA::String_var)aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData()) );
+        if ( aRoot && aRoot->study() ) {
+          CORBA::String_var data = aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData());
+          QString objInfo = data.in();
+          QStringList l;
+          l << name();
+          if ( !objInfo.isEmpty() )
+            l << objInfo;
+          return l.join("\n");
+        }
       }
     }
   }