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:
parent
dc9e3728f5
commit
e5439c7775
@ -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 );
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user