Skip to content

Commit

Permalink
Restore wraparound in [Library],MoveVertical
Browse files Browse the repository at this point in the history
This makes navigating key-sorted track lists using a controller much
more convenient. Though as mentioned in the comment, this does not match
the Up/Down cursor key behavior. Should those also wrap around?
  • Loading branch information
robbert-vdh committed Nov 23, 2022
1 parent 8affbbb commit dc83783
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/library/librarycontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,14 @@ void LibraryControl::slotMoveVertical(double v) {
return;
}
case FocusWidget::TracksTable: {
// This wraps around at top/bottom. Doesn't match Up/Down key behaviour
// and may not be desired.
//int i = static_cast<int>(v);
//slotSelectTrack(i);
//return;
break;
// This wraps around at the top/bottom of the tracks list. Doesn't match
// Up/Down key behaviour, but it greatly improves the ergonomics of
// navigating a list of tracks sorted by key from a controller.
// Otherwise moving from 12/C#m/E to 1/G#m/B requires either a serious
// workout or reaching for the mouse/keyboard.
const auto i = static_cast<int>(v);
slotSelectTrack(i);
return;
}
case FocusWidget::Dialog: {
// For navigating dialogs map up/down to Tab/BackTab
Expand Down

0 comments on commit dc83783

Please sign in to comment.