Fixed a minor issue where the playlist wasnt updating the queue order, when a track was dequeued using the ctrl-d shortcut

This commit is contained in:
Helder Martins 2014-07-23 00:15:06 +01:00
parent bc754e0a26
commit 0c2d4e9f1c
4 changed files with 15 additions and 1 deletions

View File

@ -1984,6 +1984,7 @@ void Playlist::TracksDequeued() {
emit dataChanged(index, index);
}
temp_dequeue_change_indexes_.clear();
emit QueueChanged();
}
void Playlist::TracksEnqueued(const QModelIndex&, int begin, int end) {

View File

@ -333,6 +333,10 @@ signals:
void LoadTracksError(const QString& message);
// Signals that the queue has changed, meaning that the remaining queued
// items should update their position.
void QueueChanged();
private:
void SetCurrentIsPaused(bool paused);
void UpdateScrobblePoint();

View File

@ -256,6 +256,7 @@ void PlaylistView::SetPlaylist(Playlist* playlist) {
disconnect(playlist_, SIGNAL(DynamicModeChanged(bool)), this,
SLOT(DynamicModeChanged(bool)));
disconnect(playlist_, SIGNAL(destroyed()), this, SLOT(PlaylistDestroyed()));
disconnect(playlist_, SIGNAL(QueueChanged()), this, SLOT(UpdateView()));
disconnect(dynamic_controls_, SIGNAL(Expand()), playlist_,
SLOT(ExpandDynamicPlaylist()));
@ -273,11 +274,12 @@ void PlaylistView::SetPlaylist(Playlist* playlist) {
read_only_settings_ = false;
connect(playlist_, SIGNAL(RestoreFinished()), SLOT(JumpToLastPlayedTrack()));
connect(playlist_, SIGNAL(CurrentSongChanged(Song)), SLOT(MaybeAutoscroll()));
connect(playlist_, SIGNAL(DynamicModeChanged(bool)),
SLOT(DynamicModeChanged(bool)));
connect(playlist_, SIGNAL(destroyed()), SLOT(PlaylistDestroyed()));
connect(playlist_, SIGNAL(QueueChanged()), SLOT(UpdateView()));
connect(dynamic_controls_, SIGNAL(Expand()), playlist_,
SLOT(ExpandDynamicPlaylist()));
connect(dynamic_controls_, SIGNAL(Repopulate()), playlist_,
@ -1319,3 +1321,7 @@ void PlaylistView::focusInEvent(QFocusEvent* event) {
}
}
}
void PlaylistView::UpdateView() {
update();
}

View File

@ -105,6 +105,9 @@ class PlaylistView : public QTreeView {
const QImage& cover_art);
void PlayerStopped();
// General slot to update the whole playlistview
void UpdateView();
signals:
void PlayItem(const QModelIndex& index);
void PlayPause();