diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-06-04 05:43:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-06-04 05:43:41 +0000 |
commit | 8a34a88474735ca9b090a8e17b674f856a59be70 (patch) | |
tree | 83009265d0c470268df24b886c26e3d08403be9d /konq-plugins/dirfilter | |
parent | e093d5d571fbd8439907fd85c5ef9e434dcfb8c9 (diff) | |
download | tdeaddons-8a34a88474735ca9b090a8e17b674f856a59be70.tar.gz tdeaddons-8a34a88474735ca9b090a8e17b674f856a59be70.zip |
Fixed bug causing continuous refresh of filterbar, thereby preventing scrolling in Konqueror iconview mode
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1134358 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/dirfilter')
-rw-r--r-- | konq-plugins/dirfilter/dirfilterplugin.cpp | 11 | ||||
-rw-r--r-- | konq-plugins/dirfilter/dirfilterplugin.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/konq-plugins/dirfilter/dirfilterplugin.cpp b/konq-plugins/dirfilter/dirfilterplugin.cpp index 3e16bf4..dbf034f 100644 --- a/konq-plugins/dirfilter/dirfilterplugin.cpp +++ b/konq-plugins/dirfilter/dirfilterplugin.cpp @@ -145,7 +145,8 @@ DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name, const QStringList&) :KParts::Plugin (parent, name), m_pFilterMenu(0), - m_searchWidget(0) + m_searchWidget(0), + m_oldFilterString("") { m_part = ::qt_cast<KonqDirPart*>(parent); @@ -473,6 +474,14 @@ void DirFilterPlugin::slotItemRemoved (const KFileItem* item) void DirFilterPlugin::activateSearch() { + if (!m_searchWidget) + return; + + if (m_oldFilterString == m_searchWidget->text()) + return; + + m_oldFilterString = m_searchWidget->text(); + if ( ::qt_cast<KListView*>(m_part->scrollWidget()) ) { static_cast<KListViewSearchLine*>(m_searchWidget)->updateSearch(); } diff --git a/konq-plugins/dirfilter/dirfilterplugin.h b/konq-plugins/dirfilter/dirfilterplugin.h index 74ad8e2..963d731 100644 --- a/konq-plugins/dirfilter/dirfilterplugin.h +++ b/konq-plugins/dirfilter/dirfilterplugin.h @@ -127,6 +127,7 @@ private: KonqDirPart* m_part; QTimer *m_refreshTimer; KActionMenu* m_pFilterMenu; + QString m_oldFilterString; KLineEdit *m_searchWidget; QMap<QString,MimeInfo> m_pMimeInfo; |