Skip to content

emptyview: Add mock {un}select_all methods

Jean Felder requested to merge wip/jfelder/emptyview-search into master

EmptyView does not inherit from BaseView anymore. Therefore, it does not have any default {un}select_all methods anymore. This can lead to a crash when selection_mode is enabled from a view or a widget and then a search which returns no result is triggered.

Add select_all and unselect_all methods to EmptyView to prevent this crash. These functions do nothing as no song, artist or album can be selected from an empty view.

This is really a corner case and I don't think there is a really elegant way to deal with it. An other solution would be to add a "if empty view do nothing" in {un}select_all methods in window.py. But this seems a little more hackish to me.

Also see !344 (merged)

Merge request reports