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:
@@ -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 );
|
||||
}
|
||||
|
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user