Search engine: properly interact with filtering

See https://github.com/arybczak/ncmpcpp/issues/260
This commit is contained in:
Andrzej Rybczak
2018-03-18 11:41:57 +01:00
parent 557720061d
commit 2f3588edf3
2 changed files with 3 additions and 0 deletions

1
NEWS
View File

@@ -2,6 +2,7 @@ ncmpcpp-0.8.2 (????-??-??)
* Help screen: fixed display of EoF keycode
* Fixed possible integer overflow when resizing screen
* Fixed fetching lyrics from lyricsmania.com, metrolyrics.com and sing365.com
* Search engine now properly interacts with filtering
ncmpcpp-0.8.1 (2017-10-11)
* Setting 'colors_enabled' to 'no' no longer results in a crash.

View File

@@ -243,6 +243,7 @@ void SearchEngine::mouseButtonPressed(MEVENT me)
bool SearchEngine::allowsSearching()
{
ScopedUnfilteredMenu<SEItem> sunfilter(ReapplyFilter::Yes, w);
return w.rbegin()->value().isSong();
}
@@ -425,6 +426,7 @@ void SearchEngine::reset()
{
for (size_t i = 0; i < ConstraintsNumber; ++i)
itsConstraints[i].clear();
w.clearFilter();
w.reset();
Prepare();
Statusbar::print("Search state reset");