summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-05-08 08:42:57 -0500
committerBen Loftis <ben@harrisonconsoles.com>2018-05-08 08:45:22 -0500
commita5d90c3d9d3cbace6dada563a7a2b0e3458bbef1 (patch)
treea83c9b018a15efd2ea4e020a21d4968144e22b7b /gtk2_ardour
parente83301daaa2b83611e70b3eb2175b135f95af9d7 (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.cc10
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