From 191ee259d4d71ffe4d3d5080201763253de7fd2c Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Wed, 29 Feb 2012 22:28:54 -0500 Subject: [PATCH] TWK-671: Fix filter text being 'behind' by one step --- src/libtomahawk/playlist/artistview.cpp | 4 ++-- src/libtomahawk/playlist/artistview.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/playlist/artistview.cpp b/src/libtomahawk/playlist/artistview.cpp index ff83b2eeb..d2276b474 100644 --- a/src/libtomahawk/playlist/artistview.cpp +++ b/src/libtomahawk/playlist/artistview.cpp @@ -133,7 +133,7 @@ ArtistView::setTreeModel( TreeModel* model ) connect( m_proxyModel, SIGNAL( filteringFinished() ), m_loadingSpinner, SLOT( fadeOut() ) ); connect( m_model, SIGNAL( itemCountChanged( unsigned int ) ), SLOT( onItemCountChanged( unsigned int ) ) ); - connect( m_proxyModel, SIGNAL( filterChanged( QString ) ), SLOT( onFilterChanged( QString ) ) ); + connect( m_proxyModel, SIGNAL( filteringFinished() ), SLOT( onFilterChangeFinished() ) ); connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) ); guid(); // this will set the guid on the header @@ -279,7 +279,7 @@ ArtistView::onItemCountChanged( unsigned int items ) void -ArtistView::onFilterChanged( const QString& ) +ArtistView::onFilterChangeFinished() { if ( selectedIndexes().count() ) scrollTo( selectedIndexes().at( 0 ), QAbstractItemView::PositionAtCenter ); diff --git a/src/libtomahawk/playlist/artistview.h b/src/libtomahawk/playlist/artistview.h index 061bca781..30245534f 100644 --- a/src/libtomahawk/playlist/artistview.h +++ b/src/libtomahawk/playlist/artistview.h @@ -93,7 +93,7 @@ protected slots: private slots: void onItemCountChanged( unsigned int items ); - void onFilterChanged( const QString& filter ); + void onFilterChangeFinished(); void onFilteringStarted(); void onViewChanged(); void onScrollTimeout();