From 5fdcd6c690df0565799ba19146f9bd1aabecc47f Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 12 Jun 2013 09:23:14 +0200 Subject: [PATCH] * Show a default track cover until we retrieved the proper, new one. --- src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp b/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp index 73efc4857..f3b38ad5c 100644 --- a/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp +++ b/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp @@ -37,9 +37,7 @@ ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent ) setVisible( false ); ui->setupUi( this ); - ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Grid, ui->cover->size() ) ); ui->cover->setShowText( false ); - ui->artistLabel->setContentsMargins( 6, 2, 6, 2 ); ui->artistLabel->setElideMode( Qt::ElideMiddle ); ui->artistLabel->setType( QueryLabel::Artist ); @@ -126,7 +124,10 @@ void ColumnViewPreviewWidget::onCoverUpdated() { if ( m_query->track()->cover( QSize( 0, 0 ) ).isNull() ) + { + ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Grid, ui->cover->size() ) ); return; + } ui->cover->setPixmap( TomahawkUtils::createRoundedImage( m_query->track()->cover( ui->cover->size() ), QSize( 0, 0 ) ) ); }