mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-11 09:24:50 +01:00
Fix a crash when changing 'group by' while album covers are still loading
This commit is contained in:
parent
85858d7bbe
commit
59589494ae
@ -560,6 +560,11 @@ void GlobalSearchView::GroupByClicked(QAction* action) {
|
||||
}
|
||||
|
||||
void GlobalSearchView::SetGroupBy(const LibraryModel::Grouping& g) {
|
||||
// Clear requests: changing "group by" on the models will cause all the items to be removed/added
|
||||
// again, so all the QModelIndex here will become invalid. New requests will be created for those
|
||||
// songs when they will be displayed again anyway (when GlobalSearchItemDelegate::paint will call
|
||||
// LazyLoadArt)
|
||||
art_requests_.clear();
|
||||
// Update the models
|
||||
front_model_->SetGroupBy(g, true);
|
||||
back_model_->SetGroupBy(g, false);
|
||||
|
Loading…
Reference in New Issue
Block a user