From 55f064a59b857e6ca69a5ce4afe1f382f22aa9a7 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 8 Sep 2009 14:06:38 +0200 Subject: [PATCH] make NCurses::Menu::Clear() clear used filter --- src/menu.h | 1 + src/status.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/menu.h b/src/menu.h index 6a9821d7..aabe9bf7 100644 --- a/src/menu.h +++ b/src/menu.h @@ -571,6 +571,7 @@ template void NCurses::Menu::Clear(bool clrscr) delete *it; itsOptions.clear(); itsFound.clear(); + itsFilter.clear(); ClearFiltered(); itsOptionsPtr = &itsOptions; if (clrscr) diff --git a/src/status.cpp b/src/status.cpp index 1d4a916c..efce8873 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -70,10 +70,7 @@ void StatusbarApplyFilterImmediately(const std::wstring &ws) { static std::wstring cmp; if (cmp != ws) - { - myScreen->ApplyFilter(ToString(ws)); - cmp = ws; - } + myScreen->ApplyFilter(ToString((cmp = ws))); myScreen->RefreshWindow(); TraceMpdStatus(); }