From 19b26acde9d56072f431d0c6d43e8dab8eb6d0c9 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 10 Dec 2014 04:34:21 +0100 Subject: [PATCH] Setup closure after adding tracks to model, so we don't accidentally clear/append twice. --- src/libtomahawk/playlist/TreeModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/TreeModel.cpp b/src/libtomahawk/playlist/TreeModel.cpp index 516317bc5..af796bb49 100644 --- a/src/libtomahawk/playlist/TreeModel.cpp +++ b/src/libtomahawk/playlist/TreeModel.cpp @@ -213,10 +213,9 @@ TreeModel::addTracks( const album_ptr& album, const QModelIndex& parent ) { startLoading(); + onTracksAdded( album->tracks( m_mode, m_collection ), parent ); NewClosure( album.data(), SIGNAL( tracksAdded( QList, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ), const_cast(this), SLOT( addTracks( Tomahawk::album_ptr, QModelIndex ) ), album, parent ); - - onTracksAdded( album->tracks( m_mode, m_collection ), parent ); }