From 9ad7d862ec1f3d58961a97d5a9fcf51fae39cbe2 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 15 May 2015 17:05:02 +0300 Subject: [PATCH] Show name of the object in the tooltip in addition to object info; useful when long name is truncated by object browser's column --- src/SalomeApp/SalomeApp_DataObject.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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"); + } } } } -- 2.39.2