Update grouped-view controlled albums set when we update model

This commit is contained in:
craig
2012-04-16 18:36:02 +00:00
parent 0970d7f5ec
commit 7afc042d9c
7 changed files with 23 additions and 15 deletions

View File

@@ -94,6 +94,7 @@ PlaylistsPage::PlaylistsPage(MainWindow *p)
connect(this, SIGNAL(removeFromPlaylist(const QString &, const QList<quint32> &)), MPDConnection::self(), SLOT(removeFromPlaylist(const QString &, const QList<quint32> &)));
connect(p->savePlaylistAction, SIGNAL(activated()), this, SLOT(savePlaylist()));
connect(renamePlaylistAction, SIGNAL(triggered()), this, SLOT(renamePlaylist()));
connect(PlaylistsModel::self(), SIGNAL(updated(const QModelIndex &)), this, SLOT(updated(const QModelIndex &)));
connect(PlaylistsModel::self(), SIGNAL(playlistRemoved(quint32)), view, SLOT(collectionRemoved(quint32)));
MainWindow::initButton(menuButton);
menuButton->setPopupMode(QToolButton::InstantPopup);
@@ -367,6 +368,11 @@ void PlaylistsPage::searchItems()
}
}
void PlaylistsPage::updated(const QModelIndex &index)
{
view->updateRows(proxy.mapFromSource(index));
}
void PlaylistsPage::updateGenres(const QSet<QString> &g)
{
if (genreCombo->count() && g==genres) {