1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

* Fixed TWK-387: Stop showing a loading spinner, if there are no items to load.

This commit is contained in:
Christian Muehlhaeuser 2011-08-21 02:38:14 +02:00
parent 552a07eee7
commit 43bf42df6f
2 changed files with 6 additions and 8 deletions

View File

@ -74,8 +74,7 @@ DatabaseCommand_AllAlbums::execForArtist( DatabaseImpl* dbi )
al << album;
}
if ( al.count() )
emit albums( al, data() );
emit albums( al, data() );
emit done();
}
@ -124,8 +123,7 @@ DatabaseCommand_AllAlbums::execForCollection( DatabaseImpl* dbi )
al << album;
}
if ( al.count() )
emit albums( al, data() );
emit albums( al, data() );
emit done();
}

View File

@ -526,6 +526,8 @@ void
TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVariant& data )
{
qDebug() << Q_FUNC_INFO << albums.count() << data.toInt();
emit loadingFinished();
if ( !albums.count() )
return;
@ -568,8 +570,6 @@ TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVaria
emit endInsertRows();
else
emit dataChanged( albumitem->index, albumitem->index.sibling( albumitem->index.row(), columnCount( QModelIndex() ) - 1 ) );
emit loadingFinished();
}
@ -577,6 +577,8 @@ void
TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVariant& data )
{
qDebug() << Q_FUNC_INFO << tracks.count();
emit loadingFinished();
if ( !tracks.count() )
return;
@ -610,8 +612,6 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVaria
emit endInsertRows();
emit dataChanged( item->index.sibling( 0, 0 ), item->index.sibling( item->index.row(), columnCount( QModelIndex() ) - 1 ) );
emit loadingFinished();
}