Summary: | after starting playing "up" or "down"-keys jumps to the first playlist entry | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Kostya Sha <gentoo.integer> |
Component: | Playlist | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kfunk, nhn, teo |
Priority: | NOR | ||
Version: | 2.2.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Kostya Sha
2010-02-07 03:49:19 UTC
This looks like a bug in our keeping the selection model in sync... commit c6fccef763abfc752e1d11a81a7ff8b419db473c Author: Nikolaj Hald Nielsen <nhn@kde.org> Date: Wed Feb 24 15:49:28 2010 +0100 Set the "current index" to the activated row, when activating a row in the playlist. This prevents keyboard navigation going astray when starting playback of a track. BUG: 225791 diff --git a/src/playlist/view/listview/PrettyListView.cpp b/src/playlist/view/listview/PrettyListView.cpp index f36b3a1..4e9f415 100644 --- a/src/playlist/view/listview/PrettyListView.cpp +++ b/src/playlist/view/listview/PrettyListView.cpp @@ -254,6 +254,11 @@ Playlist::PrettyListView::trackActivated( const QModelIndex& idx ) DEBUG_BLOCK m_skipAutoScroll = true; // we don't want to do crazy view changes when selecting an item in the view Actions::instance()->play( idx ); + + //make sure that the track we just activated is also set as the current index or + //the selected index will get moved to the first row, making keyboard navigation difficult (BUG 225791) + selectionModel()->setCurrentIndex( idx, QItemSelectionModel::ClearAndSelect ); + } void |