diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2017-01-12 09:33:57 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2017-01-12 11:51:43 -0600 |
commit | 75c029f65f00df01fdd861c9d1a768a98faf1063 (patch) | |
tree | a7c0aa1850292b38251e80c8e10c485e66808b99 /gtk2_ardour/editor_ops.cc | |
parent | 1e30ec72865342c962c4d114e8ae75e1c24ced1c (diff) |
Support repeated jump-backward-to-mark while playing.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 6a21dd8432..633a6989d8 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2376,6 +2376,14 @@ Editor::jump_backward_to_mark () framepos_t pos = _session->locations()->first_mark_before (playhead_cursor->current_frame()); + //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... + if ( _session->transport_rolling() ) { + if ( (playhead_cursor->current_frame() - pos) < _session->frame_rate()/2 ) { + framepos_t prior = _session->locations()->first_mark_before ( pos ); + pos = prior; + } + } + if (pos < 0) { return; } |