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

Make sure album grid on collection page is sorted.

This commit is contained in:
Christian Muehlhaeuser
2014-11-12 06:29:03 +01:00
parent 3be3cbd1dc
commit 7bc1b7576a

View File

@@ -71,7 +71,6 @@ CollectionViewPage::CollectionViewPage( const Tomahawk::collection_ptr& collecti
m_albumView->setItemWidth( TomahawkUtils::DpiScaler::scaledX( this, 170 ) ); m_albumView->setItemWidth( TomahawkUtils::DpiScaler::scaledX( this, 170 ) );
m_albumView->delegate()->setWordWrapping( true ); m_albumView->delegate()->setWordWrapping( true );
m_albumView->proxyModel()->sort( -1 );
m_albumView->setEmptyTip( tr( "Sorry, there are no albums in this collection!" ) ); m_albumView->setEmptyTip( tr( "Sorry, there are no albums in this collection!" ) );
TomahawkStyle::stylePageFrame( m_albumView ); TomahawkStyle::stylePageFrame( m_albumView );
@@ -186,6 +185,7 @@ CollectionViewPage::setAlbumModel( PlayableModel* model )
m_albumModel = model; m_albumModel = model;
m_albumView->setPlayableModel( model ); m_albumView->setPlayableModel( model );
m_albumView->proxyModel()->sort( PlayableModel::Artist, Qt::AscendingOrder );
if ( oldModel ) if ( oldModel )
{ {