mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Possible fix for multiple breadcrumbs. Erase buttons before resettin the model.
This commit is contained in:
@@ -73,7 +73,7 @@ ChartsPlugin::namChangedSlot( QNetworkAccessManager *nam )
|
|||||||
m_nam = QWeakPointer< QNetworkAccessManager >( nam );
|
m_nam = QWeakPointer< QNetworkAccessManager >( nam );
|
||||||
|
|
||||||
/// Then get each chart from resource
|
/// 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 ){
|
if( !m_chartResources.isEmpty() && m_nam ){
|
||||||
|
|
||||||
@@ -194,6 +194,7 @@ ChartsPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requ
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||||
|
|
||||||
emit getCachedInfo( criteria, 0, requestData );
|
emit getCachedInfo( criteria, 0, requestData );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,6 +56,10 @@ Breadcrumb::~Breadcrumb()
|
|||||||
void
|
void
|
||||||
Breadcrumb::setModel( QAbstractItemModel* model )
|
Breadcrumb::setModel( QAbstractItemModel* model )
|
||||||
{
|
{
|
||||||
|
foreach ( BreadcrumbButton* b, m_buttons )
|
||||||
|
b->deleteLater();;
|
||||||
|
m_buttons.clear();
|
||||||
|
|
||||||
m_model = model;
|
m_model = model;
|
||||||
updateButtons( QModelIndex() );
|
updateButtons( QModelIndex() );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user