clear search results if empty string is passed to FindForward/Backward

This commit is contained in:
Andrzej Rybczak
2013-04-07 14:10:41 +02:00
parent 1d4e006986
commit d451731562
6 changed files with 41 additions and 0 deletions

View File

@@ -596,6 +596,16 @@ bool MediaLibrary::allowsSearching()
bool MediaLibrary::search(const std::string &constraint)
{
if (constraint.empty())
{
if (isActiveWindow(Tags))
Tags.clearSearchResults();
else if (isActiveWindow(Albums))
Albums.clearSearchResults();
else if (isActiveWindow(Songs))
Songs.clearSearchResults();
return false;
}
try
{
bool result = false;