From 5b36fda511550966e74892c8d4d7bafa4d2efb16 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 24 Mar 2009 18:11:21 +0100 Subject: [PATCH] reapply filter even if it's the same as the last one applied --- src/menu.h | 2 -- src/status.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/menu.h b/src/menu.h index eaa015b6..1996513d 100644 --- a/src/menu.h +++ b/src/menu.h @@ -671,8 +671,6 @@ template void NCurses::Menu::PrevFound(bool wrap) template void NCurses::Menu::ApplyFilter(const std::string &filter, size_t beginning, int flags) { - if (filter == itsFilter) - return; itsFound.clear(); ClearFiltered(); itsFilter = filter; diff --git a/src/status.cpp b/src/status.cpp index ceec836e..7bf2b24b 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -65,7 +65,12 @@ void StatusbarGetStringHelper(const std::wstring &) void StatusbarApplyFilterImmediately(const std::wstring &ws) { - myScreen->ApplyFilter(ToString(ws)); + static std::wstring cmp; + if (cmp != ws) + { + myScreen->ApplyFilter(ToString(ws)); + cmp = ws; + } myScreen->RefreshWindow(); TraceMpdStatus(); }