From 1ea04025e4c83a456760bcc00e90507db0ccfb8d Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 28 Aug 2014 21:18:10 +0200 Subject: [PATCH] * Make PlayableProxyModel aware of artist and album items when updating detail info. --- .../playlist/PlayableProxyModel.cpp | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/libtomahawk/playlist/PlayableProxyModel.cpp b/src/libtomahawk/playlist/PlayableProxyModel.cpp index 94bff68f3..9db36dba5 100644 --- a/src/libtomahawk/playlist/PlayableProxyModel.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModel.cpp @@ -613,21 +613,24 @@ PlayableProxyModel::columnWeights() const void PlayableProxyModel::updateDetailedInfo( const QModelIndex& index ) { - if ( style() != PlayableProxyModel::Short && style() != PlayableProxyModel::Large ) - return; - PlayableItem* item = itemFromIndex( mapToSource( index ) ); - if ( item->query().isNull() ) - return; - if ( style() == PlayableProxyModel::Short || style() == PlayableProxyModel::Large ) + if ( item->album() ) { - item->query()->track()->cover( QSize( 0, 0 ) ); + item->album()->cover( QSize( 0, 0 ) ); } - - if ( style() == PlayableProxyModel::Large ) + else if ( item->artist() ) { - item->query()->track()->loadSocialActions(); + item->artist()->cover( QSize( 0, 0 ) ); + } + else if ( item->query() ) + { +// item->query()->track()->cover( QSize( 0, 0 ) ); + + if ( style() == PlayableProxyModel::Large ) + { + item->query()->track()->loadSocialActions(); + } } }