1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-26 15:25:04 +02:00

Fix broken button state after download from GridView

This commit is contained in:
Dominik Schmidt
2016-04-14 14:49:46 +02:00
parent c88640268a
commit 5bbc39e6a5

View File

@@ -343,7 +343,7 @@ GridItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
text = tr( "Buy" ); text = tr( "Buy" );
} }
if ( !item->result() || !item->result()->downloadJob() ) if ( !item->result() || !item->result()->downloadJob() || item->result()->downloadJob()->state() == DownloadJob::Finished )
{ {
if ( !text.isEmpty() ) if ( !text.isEmpty() )
DropDownButton::drawPrimitive( painter, r, text, m_hoveringOverBuyButton == index, false ); DropDownButton::drawPrimitive( painter, r, text, m_hoveringOverBuyButton == index, false );