diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-05-08 08:42:57 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2018-05-08 08:45:22 -0500 |
commit | a5d90c3d9d3cbace6dada563a7a2b0e3458bbef1 (patch) | |
tree | a83c9b018a15efd2ea4e020a21d4968144e22b7b /gtk2_ardour | |
parent | e83301daaa2b83611e70b3eb2175b135f95af9d7 (diff) |
Arrow keys (playhead_x_to_grid()) should move the view along with it. This is more consistent with jog-wheel operation, which has proven to work nicely.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 7ac2e08390..36a67d0a01 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -7357,6 +7357,11 @@ Editor::playhead_forward_to_grid () snap_to_internal (pos, RoundUpAlways, SnapToGrid, false, true); _session->request_locate (pos.sample); } + + /* keep PH visible in window */ + if (pos.sample > (_leftmost_sample + current_page_samples() *0.9)) { + reset_x_origin (pos.sample - (current_page_samples()*0.9)); + } } @@ -7374,6 +7379,11 @@ Editor::playhead_backward_to_grid () snap_to_internal (pos, RoundDownAlways, SnapToGrid, false, true); _session->request_locate (pos.sample); } + + /* keep PH visible in window */ + if (pos.sample < (_leftmost_sample + current_page_samples() *0.1)) { + reset_x_origin (pos.sample - (current_page_samples()*0.1)); + } } void |