From 4ecb07aaee57e72aedb744f0cce885f418320e70 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Jan 2013 13:19:16 +0000 Subject: 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 --- gtk2_ardour/editor_ops.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'gtk2_ardour') 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 -- cgit v1.2.3