fix region gain via range tool
authorRobin Gareus <robin@gareus.org>
Wed, 25 May 2016 00:46:57 +0000 (02:46 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 25 May 2016 00:46:57 +0000 (02:46 +0200)
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

index 6eb017134da64b0ab06ba898572093867ee7474d..8788717bd172fe921cba667d58f22767108ce630 100644 (file)
@@ -677,10 +677,14 @@ Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, Automation
        AudioRegionGainLine* gl;
        if ((gl = dynamic_cast<AudioRegionGainLine*> (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;