Emit dataChanged() for all album header items that match the album currently

being expanded/collpased in the groupedview.
This commit is contained in:
craig.p.drummond@gmail.com
2012-04-24 21:43:08 +00:00
parent 8003b6bcec
commit bd79c82d7f
2 changed files with 8 additions and 4 deletions

View File

@@ -49,6 +49,8 @@
24. Load library view covers in separate thread, as per albums view.
25. Add expandAll (Ctrl +) / collpseAll (Ctrl -) actions to expand/collapse all
items of currently focused treeview.
26. Emit dataChanged() for all album header items that match the album currently
being expanded/collpased in the groupedview.
0.6.1
-----

View File

@@ -506,12 +506,14 @@ void GroupedView::toggle(const QModelIndex &idx)
for (quint32 i=0; i<count; ++i) {
QModelIndex index=model()->index(i, 0, parent);
quint16 key=index.data(GroupedView::Role_Key).toUInt();
if (indexKey==key && !isAlbumHeader(index)) {
setRowHidden(i, parent, toBeHidden);
if (indexKey==key) {
if (isAlbumHeader(index)) {
dataChanged(index, index);
} else {
setRowHidden(i, parent, toBeHidden);
}
}
}
dataChanged(idx, idx);
}
}