Don't treat the smart playlist node in the library like a regular container when applying filters - fixes an assertion when clicking the smart playlist node with None/None/None grouping. Fixes issue 1913

This commit is contained in:
David Sansome 2011-06-14 15:27:07 +00:00
parent 563de288ba
commit 42fe215443
1 changed files with 2 additions and 1 deletions

View File

@ -556,7 +556,7 @@ void LibraryModel::LazyPopulate(LibraryItem* parent, bool signal) {
// Walk up through the item's parents adding filters as necessary
LibraryItem* p = parent;
while (p != root_) {
while (p && p->type == LibraryItem::Type_Container) {
FilterQuery(group_by_[p->container_level], p, &q);
p = p->parent;
}
@ -1094,6 +1094,7 @@ void LibraryModel::CreateSmartPlaylists() {
smart_playlist_node_->container_level = 0;
smart_playlist_node_->sort_text = "\0";
smart_playlist_node_->key = tr("Smart playlists");
smart_playlist_node_->lazy_loaded = true;
QSettings s;
s.beginGroup(kSmartPlaylistsSettingsGroup);