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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user