clear filters when empty string is passed to applyFilter

boost::regex doesn't like empty strings in literal mode and throws exceptions.
This commit is contained in:
Andrzej Rybczak
2013-04-28 23:25:08 +02:00
parent d0b0f1f57c
commit 786ffe9182
6 changed files with 65 additions and 0 deletions

View File

@@ -251,6 +251,12 @@ std::string Browser::currentFilter()
void Browser::applyFilter(const std::string &filter)
{
if (filter.empty())
{
w.clearFilter();
w.clearFilterResults();
return;
}
try
{
w.showAll();