reapply filter even if it's the same as the last one applied

This commit is contained in:
Andrzej Rybczak
2009-03-24 18:11:21 +01:00
parent 3710d3bafd
commit 5b36fda511
2 changed files with 6 additions and 3 deletions

View File

@@ -671,8 +671,6 @@ template <typename T> void NCurses::Menu<T>::PrevFound(bool wrap)
template <typename T> void NCurses::Menu<T>::ApplyFilter(const std::string &filter, size_t beginning, int flags) template <typename T> void NCurses::Menu<T>::ApplyFilter(const std::string &filter, size_t beginning, int flags)
{ {
if (filter == itsFilter)
return;
itsFound.clear(); itsFound.clear();
ClearFiltered(); ClearFiltered();
itsFilter = filter; itsFilter = filter;

View File

@@ -65,7 +65,12 @@ void StatusbarGetStringHelper(const std::wstring &)
void StatusbarApplyFilterImmediately(const std::wstring &ws) 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(); myScreen->RefreshWindow();
TraceMpdStatus(); TraceMpdStatus();
} }