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:
@@ -559,6 +559,25 @@ std::string MediaLibrary::currentFilter()
|
||||
|
||||
void MediaLibrary::applyFilter(const std::string &filter)
|
||||
{
|
||||
if (filter.empty())
|
||||
{
|
||||
if (isActiveWindow(Tags))
|
||||
{
|
||||
Tags.clearFilter();
|
||||
Tags.clearFilterResults();
|
||||
}
|
||||
else if (isActiveWindow(Albums))
|
||||
{
|
||||
Albums.clearFilter();
|
||||
Albums.clearFilterResults();
|
||||
}
|
||||
else if (isActiveWindow(Songs))
|
||||
{
|
||||
Songs.clearFilter();
|
||||
Songs.clearFilterResults();
|
||||
}
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (isActiveWindow(Tags))
|
||||
|
||||
Reference in New Issue
Block a user