From 66740aa10a20d9b17651910e3c2feca0dab0862e Mon Sep 17 00:00:00 2001 From: Nikolay Tischenko Date: Sun, 20 Mar 2011 19:17:05 +0600 Subject: [PATCH] Positioning on next track after removing from pls --- src/playerform.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/playerform.cpp b/src/playerform.cpp index d754235..d07efb3 100644 --- a/src/playerform.cpp +++ b/src/playerform.cpp @@ -299,6 +299,11 @@ void PlayerForm::_delete_track() { _current_playlist.removeTrackAt(id); _lib->saveCurrentPlaylist(_current_playlist); reload(true); + int rc = _model->rowCount(); + if (id >= rc) { + id = rc-1; + } + ui->playlistView->scrollTo(_model->index(id, 0), QAbstractItemView::PositionAtCenter); } void PlayerForm::_enqueue_track() { -- 1.7.9.5