diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-05-17 15:00:50 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2018-05-17 15:01:09 -0500 |
commit | 41cf86cb9f8a1256f0dd942c814333a352d260e0 (patch) | |
tree | 94ee27ced0ee7a013ef2dd1efc1e9e539918eaaa /gtk2_ardour/editor_ops.cc | |
parent | 10add0fbb94e3739b92ee777fece5e4967a8f240 (diff) |
Playhead to Grid: handle case where PH is rolling, and we are prevented from skipping backwards sensibly.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 7439ad353f..d730bb772a 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -7397,8 +7397,17 @@ Editor::playhead_backward_to_grid () if (pos.sample > 2) { pos.sample -= 2; snap_to_internal (pos, RoundDownAlways, SnapToGrid, false, true); - _session->request_locate (pos.sample); } + + //handle the case where we are rolling, and we're less than one-half second past the mark, we want to go to the prior mark... + //also see: jump_backward_to_mark + if (_session->transport_rolling()) { + if ((playhead_cursor->current_sample() - pos.sample) < _session->sample_rate()/2) { + snap_to_internal (pos, RoundDownAlways, SnapToGrid, false, true); + } + } + + _session->request_locate (pos.sample, _session->transport_rolling()); } /* keep PH visible in window */ |