Fix 260352: Show hidden tracks warning when tracks are removed after filtering
Review Request #100928 - Created March 23, 2011 and discarded
Fix 260352 where removing tracks from the playlist after applying a filter, does not show the "Warning: tracks have been hidden in the playlist" label. This fixes it by re-applying the filter on the PrettyListView so that it emits the found/notFound signals. Since the filter itself hasn't changed, proxy updates don't happen, so it shouldn't be a performance hit. Change is minor but submitted for review since it is an unfamiliar piece of code, and also for educational purposes
Yes, it works fine. It is shown only when all filtered tracks are deleted as expected.
Also I grepped a little through the source code. Starting the complete search again (especially since the whole of PrettyListView does never do a search by itself) seems to be strange. Couldn't you instead just call ProgressiveSearchWidget::showHiddenTracksWarning if you detect that after a delete you don't have any tracks left visible but a search term and a non-empty playlist. Or even better. Re-write the whole stuff so that a PrettyListView shows the "Add tracks to the playlist to hear music." if it's empty and "All entries filtered out" if it's not really empty.