From 1587364f8daaafa5d1a83ce88aa9a5ef5424f30e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 10 Jan 2017 09:53:10 +0000 Subject: [PATCH] avoid locate when clicking in region fade handles in smart mode+follow edits --- gtk2_ardour/editor_mouse.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index e34c38c43c..8e1ef327ab 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -1255,8 +1255,20 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp return true; } - //not rolling, range mode click + join_play_range : locate the PH here - if ( !_drags->active () && _session && !_session->transport_rolling() && ( effective_mouse_mode() == MouseRange ) && UIConfiguration::instance().get_follow_edits() && !_session->config.get_external_sync() ) { + /* not rolling, effectively in range mode, follow edits enabled (likely + * to start range drag), not in a fade handle (since that means we are + * not starting a range drag): locate the PH here + */ + + if ((item_type != FadeInHandleItem) && + (item_type != FadeOutHandleItem) && + !_drags->active () && + _session && + !_session->transport_rolling() && + (effective_mouse_mode() == MouseRange) && + UIConfiguration::instance().get_follow_edits() && + !_session->config.get_external_sync()) { + framepos_t where = canvas_event_sample (event); snap_to(where); _session->request_locate (where, false);