1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Possible fix for multiple breadcrumbs. Erase buttons before resettin the model.

This commit is contained in:
Leo Franchi 2011-11-02 20:41:57 -04:00
parent 09bbc9c28d
commit f025edf095
2 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,7 @@ ChartsPlugin::namChangedSlot( QNetworkAccessManager *nam )
m_nam = QWeakPointer< QNetworkAccessManager >( nam );
/// Then get each chart from resource
/// We need to fetch them before they are asked for
/// We want to prepopulate the breadcrumb to fetch them before they are asked for
if( !m_chartResources.isEmpty() && m_nam ){
@ -194,6 +194,7 @@ ChartsPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requ
}
Tomahawk::InfoSystem::InfoStringHash criteria;
emit getCachedInfo( criteria, 0, requestData );
}

View File

@ -56,6 +56,10 @@ Breadcrumb::~Breadcrumb()
void
Breadcrumb::setModel( QAbstractItemModel* model )
{
foreach ( BreadcrumbButton* b, m_buttons )
b->deleteLater();;
m_buttons.clear();
m_model = model;
updateButtons( QModelIndex() );
}