1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-29 19:11:18 +01:00

Don't replace the whole selection when autoscrolling.

Update issue #496
Status: Fixed
I think the autoscroll is useful even when the selected song isn't the
currently playing song.  I've changed it slightly now though so it won't
replace the selection when it scrolls, so you'll be able to press up or
down to go back to where you were before.
This commit is contained in:
David Sansome 2010-07-24 14:37:11 +00:00
parent 77b4ec54bd
commit 6a03641079

View File

@ -451,12 +451,6 @@ void PlaylistView::JumpToCurrentlyPlayingTrack() {
// Scroll to the item // Scroll to the item
scrollTo(current, QAbstractItemView::PositionAtCenter); scrollTo(current, QAbstractItemView::PositionAtCenter);
// Replace the selection.
// We have to get the whole row here, not just the current cell.
selectionModel()->select(current,
QItemSelectionModel::Clear | QItemSelectionModel::Select |
QItemSelectionModel::Current | QItemSelectionModel::Rows);
currently_autoscrolling_ = false; currently_autoscrolling_ = false;
} }