fix reapplying filter the same as the last one used

I was passing Menu::itsFilter by const reference to Menu::ApplyFilter().
however, the function was clearing all filtering related stuff, including
itsFilter itself, so passed reference was pointing at previously cleared
string. then the function checked if new filter was empty and it obviously
was, so exited then. funny bug.
This commit is contained in:
Andrzej Rybczak
2009-03-24 19:26:47 +01:00
parent 5b36fda511
commit f24db993aa
2 changed files with 7 additions and 2 deletions

View File

@@ -240,7 +240,11 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
myPlaylist->Main()->Refresh();
}
if (was_filtered)
{
myPlaylist->ApplyFilter(myPlaylist->Main()->GetFilter());
if (myPlaylist->Main()->Empty())
myPlaylist->Main()->ShowAll();
}
FreeSongList(list);
}