From a6eea2b941e771413a909fb5548766de0f1cbc1b Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sat, 24 Nov 2012 17:10:20 +1100 Subject: [PATCH] Fix an off-by-one error when choosing which row to select after removing items in the playlist --- src/playlist/playlistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index 24f8df1bf..7f7cd8437 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -575,7 +575,7 @@ void PlaylistView::RemoveSelected() { model()->removeRows(range.top(), range.height(), range.parent()); } - int new_row = last_row-rows_removed+1; + int new_row = last_row - rows_removed; // Index of the first column for the row to select QModelIndex new_index = model()->index(new_row, 0);