mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-30 02:55:19 +01:00
Set next track as current when removing tracks
Fixes #5031 Attempt to set the song after the deleted tracks as the current so that they will play next rather than the beginning of the playlist.
This commit is contained in:
parent
4393f7e53f
commit
9b42ee50ef
@ -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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user