From: vsr Date: Fri, 15 May 2015 14:05:02 +0000 (+0300) Subject: Show name of the object in the tooltip in addition to object info; useful when long... X-Git-Tag: V7_6_0rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ad7d862ec1f3d58961a97d5a9fcf51fae39cbe2;p=modules%2Fgui.git Show name of the object in the tooltip in addition to object info; useful when long name is truncated by object browser's column --- diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index 055848b85..dd70f87f5 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -290,8 +290,15 @@ QString SalomeApp_DataObject::toolTip( const int /*id*/ ) const if ( !CORBA::is_nil(aComponent) && aComponent->hasObjectInfo() ) { LightApp_RootObject* aRoot = dynamic_cast( 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"); + } } } }