1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-28 11:42:42 +01:00

* Don't show an info button for empty items.

This commit is contained in:
Christian Muehlhaeuser 2012-06-26 02:12:09 +02:00
parent dc9e3728f5
commit e5439c7775
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt
opt.text.clear();
qApp->style()->drawControl( QStyle::CE_ItemViewItem, &opt, painter );
if ( m_view->hoveredIndex().row() == index.row() && m_view->hoveredIndex().column() == index.column() &&
if ( m_view->hoveredIndex().row() == index.row() && m_view->hoveredIndex().column() == index.column() && !index.data().toString().isEmpty() &&
( index.column() == PlayableModel::Artist || index.column() == PlayableModel::Album || index.column() == PlayableModel::Track ) )
{
opt.rect.setWidth( opt.rect.width() - 16 );

View File

@ -110,7 +110,7 @@ TreeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
o.rect.setX( oldX );
if ( m_view->hoveredIndex().row() == index.row() && m_view->hoveredIndex().column() == index.column() &&
( index.column() == 0 ) )
!index.data().toString().isEmpty() && index.column() == 0 )
{
o.rect.setWidth( o.rect.width() - 16 );
QRect arrowRect( o.rect.x() + o.rect.width(), o.rect.y() + 1, o.rect.height() - 2, o.rect.height() - 2 );