1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

* Fixed a few issues with the merged code.

This commit is contained in:
Christian Muehlhaeuser
2012-04-24 08:35:06 +02:00
parent 93ad670828
commit 4c6f31e7c2
2 changed files with 5 additions and 2 deletions

View File

@@ -606,7 +606,7 @@ TreeModel::fetchAlbums( const artist_ptr& artist )
emit loadingStarted();
connect( artist.data(), SIGNAL( albumsAdded( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ),
SLOT( onAlbumsFound( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ) );
SLOT( onAlbumsFound( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ), Qt::UniqueConnection );
const QModelIndex parent = indexFromArtist( artist );
addAlbums( parent, artist->albums( m_mode, m_collection ) );
@@ -620,6 +620,9 @@ TreeModel::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums, ModelMode mo
return;
const artist_ptr artist = qobject_cast< Artist* >( sender() )->weakRef().toStrongRef();
disconnect( artist.data(), SIGNAL( albumsAdded( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ),
this, SLOT( onAlbumsFound( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ) );
const QModelIndex parent = indexFromArtist( artist );
addAlbums( parent, albums );
}

View File

@@ -132,7 +132,7 @@ void
ArtistInfoWidget::onModeToggle()
{
m_albumsModel->setMode( m_button->isChecked() ? InfoSystemMode : DatabaseMode );
m_albumsModel->addAlbums( QModelIndex(), m_artist->albums( m_albumsModel->mode() ) );
m_albumsModel->fetchAlbums( m_artist );
}