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

Don't show an empty-warning while still loading album page.

This commit is contained in:
Christian Muehlhaeuser 2015-06-24 14:51:28 +02:00
parent f94949fe4a
commit f289d11566
2 changed files with 6 additions and 2 deletions

View File

@ -212,7 +212,12 @@ TreeModel::addTracks( const album_ptr& album, const QModelIndex& parent )
{
startLoading();
onTracksAdded( album->tracks( m_mode, m_collection ), parent );
QList<query_ptr> tracks = album->tracks( m_mode, m_collection );
onTracksAdded( tracks, parent );
if ( tracks.isEmpty() )
startLoading();
NewClosure( album.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
const_cast<TreeModel*>(this), SLOT( addTracks( Tomahawk::album_ptr, QModelIndex ) ), album, parent );
}

View File

@ -144,7 +144,6 @@ AlbumInfoWidget::load( const album_ptr& album )
m_headerWidget->setCaption( album->artist()->name() );
m_tracksModel->startLoading();
m_tracksModel->addTracks( album, QModelIndex() );
onAlbumImageUpdated();