diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-17 13:19:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-17 13:19:16 +0000 |
commit | 4ecb07aaee57e72aedb744f0cce885f418320e70 (patch) | |
tree | ba548f5fa7c686ada88138662ef2888b38f3dc55 /gtk2_ardour | |
parent | 53f162f9219a65d716a2523288b69d9469fb6cea (diff) |
fix up Location::first_location_(after|before) to do the right thing when marks + ranges are interleaved (functions renamed)
git-svn-id: svn://localhost/ardour2/branches/3.0@13869 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 6ceb3fd111..aeb307dc77 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1846,13 +1846,13 @@ Editor::jump_forward_to_mark () return; } - Location *location = _session->locations()->first_location_after (playhead_cursor->current_frame); + framepos_t pos = _session->locations()->first_mark_after (playhead_cursor->current_frame); - if (location) { - _session->request_locate (location->start(), _session->transport_rolling()); - } else { - _session->request_locate (_session->current_end_frame()); + if (pos < 0) { + return; } + + _session->request_locate (pos, _session->transport_rolling()); } void @@ -1862,13 +1862,13 @@ Editor::jump_backward_to_mark () return; } - Location *location = _session->locations()->first_location_before (playhead_cursor->current_frame); + framepos_t pos = _session->locations()->first_mark_before (playhead_cursor->current_frame); - if (location) { - _session->request_locate (location->start(), _session->transport_rolling()); - } else { - _session->goto_start (); + if (pos < 0) { + return; } + + _session->request_locate (pos, _session->transport_rolling()); } void |