From cec449871ea105f090e948dbe6ec39c6ca115d55 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 May 2016 02:46:57 +0200 Subject: [PATCH] fix region gain via range tool Moving the mouse over another region's gain line changed clicked_regionview. clicked_regionview is used along with range-time when initiating an AutomationRangeDrag. --- gtk2_ardour/editor_canvas_events.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 6eb017134d..8788717bd1 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -677,10 +677,14 @@ Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, Automation AudioRegionGainLine* gl; if ((gl = dynamic_cast (al)) != 0) { type = GainLineItem; - clicked_regionview = &gl->region_view (); + if (event->type == GDK_BUTTON_PRESS) { + clicked_regionview = &gl->region_view (); + } } else { type = AutomationLineItem; - clicked_regionview = 0; + if (event->type == GDK_BUTTON_PRESS) { + clicked_regionview = 0; + } } clicked_control_point = 0;