mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Fixed TWK-1779: Duped script-collection tracks.
This commit is contained in:
@@ -216,8 +216,7 @@ TreeModel::addTracks( const album_ptr& album, const QModelIndex& parent, bool au
|
||||
connect( album.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
|
||||
SLOT( onTracksFound( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ) );
|
||||
|
||||
if ( !album->tracks( m_mode, m_collection ).isEmpty() )
|
||||
onTracksAdded( album->tracks( m_mode, m_collection ), parent );
|
||||
onTracksAdded( album->tracks( m_mode, m_collection ), parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -305,6 +304,8 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QModel
|
||||
|
||||
QPair< int, int > crows;
|
||||
int c = rowCount( parent );
|
||||
removeRows( 0, c, parent );
|
||||
|
||||
crows.first = c;
|
||||
crows.second = c + tracks.count() - 1;
|
||||
|
||||
|
Reference in New Issue
Block a user