mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
* Make PlayableProxyModel aware of artist and album items when updating detail info.
This commit is contained in:
@@ -613,21 +613,24 @@ PlayableProxyModel::columnWeights() const
|
|||||||
void
|
void
|
||||||
PlayableProxyModel::updateDetailedInfo( const QModelIndex& index )
|
PlayableProxyModel::updateDetailedInfo( const QModelIndex& index )
|
||||||
{
|
{
|
||||||
if ( style() != PlayableProxyModel::Short && style() != PlayableProxyModel::Large )
|
|
||||||
return;
|
|
||||||
|
|
||||||
PlayableItem* item = itemFromIndex( mapToSource( index ) );
|
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 ) );
|
||||||
}
|
}
|
||||||
|
else if ( item->artist() )
|
||||||
if ( style() == PlayableProxyModel::Large )
|
|
||||||
{
|
{
|
||||||
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user