mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
stop spinner if tracks are removed
This commit is contained in:
@@ -154,6 +154,8 @@ PlaylistModel::clear()
|
|||||||
{
|
{
|
||||||
if ( rowCount( QModelIndex() ) )
|
if ( rowCount( QModelIndex() ) )
|
||||||
{
|
{
|
||||||
|
emit loadingFinished();;
|
||||||
|
|
||||||
emit beginResetModel();
|
emit beginResetModel();
|
||||||
delete m_rootItem;
|
delete m_rootItem;
|
||||||
m_rootItem = 0;
|
m_rootItem = 0;
|
||||||
@@ -431,6 +433,14 @@ PlaylistModel::remove( unsigned int row, bool moreToCome )
|
|||||||
void
|
void
|
||||||
PlaylistModel::removeIndex( const QModelIndex& index, bool moreToCome )
|
PlaylistModel::removeIndex( const QModelIndex& index, bool moreToCome )
|
||||||
{
|
{
|
||||||
|
TrackModelItem* item = itemFromIndex( index );
|
||||||
|
if ( item && m_waitingForResolved.contains( item->query().data() ) )
|
||||||
|
{
|
||||||
|
m_waitingForResolved.removeAll( item->query().data() );
|
||||||
|
if ( m_waitingForResolved.isEmpty() )
|
||||||
|
emit loadingFinished();
|
||||||
|
}
|
||||||
|
|
||||||
TrackModel::removeIndex( index );
|
TrackModel::removeIndex( index );
|
||||||
|
|
||||||
if ( !moreToCome && !m_playlist.isNull() )
|
if ( !moreToCome && !m_playlist.isNull() )
|
||||||
|
Reference in New Issue
Block a user