From e6b3884003ac610ab359a302a6e1fd250ec624ff Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 21 Jan 2013 13:38:38 +0100 Subject: [PATCH] * Fixed track hover rect in sidebar. --- src/sourcetree/SourceDelegate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sourcetree/SourceDelegate.cpp b/src/sourcetree/SourceDelegate.cpp index 04a363290..7cb5bb889 100644 --- a/src/sourcetree/SourceDelegate.cpp +++ b/src/sourcetree/SourceDelegate.cpp @@ -270,8 +270,8 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& painter->setPen( descColor ); painter->drawText( textRect, text, to ); - if ( colItem->source() && colItem->source()->currentTrack() ) - m_trackRects[ index ] = textRect; + if ( colItem->source() && colItem->source()->currentTrack() && colItem->source()->state() == DBSyncConnection::SYNCED ) + m_trackRects[ index ] = textRect.adjusted( 0, 0, -textRect.width() + painter->fontMetrics().width( text ), 0 ); else m_trackRects.remove( index );