diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-17 19:18:16 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2016-12-17 19:18:16 -0600 |
commit | 291631759c0d0973da39bce80b12e5edffcd041c (patch) | |
tree | 445270c55fda5d942e2088158ca0f74204246ad1 | |
parent | 28b5e8b6e2f22cc99a4cb5d5f55b1eb4570283ce (diff) |
Mini-timeline: Any click not on a marker should trigger a locate
-rw-r--r-- | gtk2_ardour/mini_timeline.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/gtk2_ardour/mini_timeline.cc b/gtk2_ardour/mini_timeline.cc index d767638e03..d050509909 100644 --- a/gtk2_ardour/mini_timeline.cc +++ b/gtk2_ardour/mini_timeline.cc @@ -454,18 +454,21 @@ bool MiniTimeline::on_button_release_event (GdkEventButton *ev) { if (!_session) { return true; } - if (ev->y < get_height () * .5) { - for (JumpList::const_iterator i = _jumplist.begin (); i != _jumplist.end(); ++i) { - if (i->left < ev->x && ev->x < i->right) { - if (ev->button == 3) { - PublicEditor::instance().center_screen (i->to); - } else if (ev->button == 1) { - _session->request_locate (i->to, _session->transport_rolling ()); - } - break; + + bool handled = false; + for (JumpList::const_iterator i = _jumplist.begin (); i != _jumplist.end(); ++i) { + if (i->left < ev->x && ev->x < i->right) { + if (ev->button == 3) { + PublicEditor::instance().center_screen (i->to); + } else if (ev->button == 1) { + _session->request_locate (i->to, _session->transport_rolling ()); } + handled = true; + break; } - } else if (ev->button == 1) { + } + + if ( !handled && ev->button == 1 ) { // copy from ::render() // TODO consolidate const framepos_t time_span = _session->config.get_minitimeline_span () / 2; const framepos_t time_span_samples = time_span * _session->nominal_frame_rate (); @@ -475,6 +478,7 @@ MiniTimeline::on_button_release_event (GdkEventButton *ev) framepos_t when = p + (ev->x - get_width() * .5) / px_per_sample; _session->request_locate (std::max ((framepos_t)0, when), _session->transport_rolling ()); } + return true; } |