Merge pull request #5125 from TheUbuntuGuy/fixnext

Set next track as current when removing tracks
This commit is contained in:
John Maguire 2015-11-23 14:03:35 +00:00
commit fcd4f5095d
1 changed files with 5 additions and 1 deletions

View File

@ -1647,7 +1647,11 @@ PlaylistItemList Playlist::RemoveItemsWithoutUndo(int row, int count) {
// Reset current_virtual_index_
if (current_row() == -1)
current_virtual_index_ = -1;
if (row - 1 > 0 && row - 1 < items_.size()) {
current_virtual_index_ = virtual_items_.indexOf(row - 1);
} else {
current_virtual_index_ = -1;
}
else
current_virtual_index_ = virtual_items_.indexOf(current_row());