diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-19 12:50:51 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-19 13:14:44 -0600 |
commit | 3e214eb4ea41aea9ef031682ee2f4ed76f7f686f (patch) | |
tree | 0802dfcee73f8331b8d62830e18ceaf2061a3dc4 /gtk2_ardour/editor_ops.cc | |
parent | 628c99d5555b30992d41e8b5b5ffef44ad7f31d7 (diff) |
Tweak behavior of Play-With-Preroll action
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 00a36dab63..2ca31f2aaf 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2626,13 +2626,12 @@ Editor::maybe_locate_with_edit_preroll ( framepos_t location ) void Editor::play_with_preroll () { - { - framepos_t preroll = get_preroll(); - - framepos_t start, end; - if (!get_selection_extents ( start, end)) - return; + framepos_t preroll = get_preroll(); + framepos_t start, end; + if ( UIConfiguration::instance().get_follow_edits() && get_selection_extents ( start, end) ) { + framepos_t ret = start; + if (start > preroll) start = start - preroll; @@ -2643,6 +2642,16 @@ Editor::play_with_preroll () lar.push_back (ar); _session->request_play_range (&lar, true); + _session->set_requested_return_frame( ret ); //force auto-return to return to range start, without the preroll + } else { + framepos_t ph = playhead_cursor->current_frame (); + framepos_t start; + if (ph > preroll) + start = ph - preroll; + else + start = 0; + _session->request_locate ( start, true); + _session->set_requested_return_frame( ph ); //force auto-return to return to playhead location, without the preroll } } |