mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
Queue up the next track in a station if the user manually removes the last one
This commit is contained in:
@@ -141,15 +141,18 @@ DynamicModel::newTrackLoading()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DynamicModel::removeIndex(const QModelIndex& index, bool moreToCome)
|
DynamicModel::removeIndex(const QModelIndex& idx, bool moreToCome)
|
||||||
{
|
{
|
||||||
if ( m_playlist->mode() == Static && isReadOnly() )
|
if ( m_playlist->mode() == Static && isReadOnly() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( m_playlist->mode() == OnDemand )
|
if( m_playlist->mode() == OnDemand ) {
|
||||||
TrackModel::removeIndex( index );
|
if( !moreToCome && idx == index( rowCount( QModelIndex() ) - 1, 0, QModelIndex() ) ) { // if the user is manually removing the last one, re-add as we're a station
|
||||||
else
|
newTrackLoading();
|
||||||
PlaylistModel::removeIndex( index, moreToCome );
|
}
|
||||||
|
TrackModel::removeIndex( idx );
|
||||||
|
} else
|
||||||
|
PlaylistModel::removeIndex( idx, moreToCome );
|
||||||
// don't call onPlaylistChanged.
|
// don't call onPlaylistChanged.
|
||||||
|
|
||||||
if( !moreToCome )
|
if( !moreToCome )
|
||||||
|
Reference in New Issue
Block a user