playlists now emit PlaylistChanged also when their ordering changes (Updates issue #374)

This commit is contained in:
Paweł Bara 2010-12-09 20:43:06 +00:00
parent fca0ce1188
commit 49f46bced8
3 changed files with 7 additions and 0 deletions

View File

@ -989,6 +989,7 @@ void Playlist::sort(int column, Qt::SortOrder order) {
// TODO
undo_stack_->clear();
emit PlaylistChanged();
Save();
}
@ -1285,6 +1286,7 @@ void Playlist::Shuffle() {
// TODO
undo_stack_->clear();
emit PlaylistChanged();
Save();
}

View File

@ -198,6 +198,8 @@ class Playlist : public QAbstractListModel {
void EditingFinished(const QModelIndex& index);
void PlayRequested(const QModelIndex& index);
// Signals that the underlying list of items was changed, meaning that
// something was added to it, removed from it or the ordering changed.
void PlaylistChanged();
void DynamicModeChanged(bool dynamic);

View File

@ -102,6 +102,9 @@ signals:
// Forwarded from individual playlists
void CurrentSongChanged(const Song& song);
// Signals that one of manager's playlists has changed (new items, new
// ordering etc.) - the argument shows which.
void PlaylistChanged(Playlist* playlist);
void EditingFinished(const QModelIndex& index);
void PlayRequested(const QModelIndex& index);