summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas_events.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-08-27 02:20:43 +1000
committernick_m <mainsbridge@gmail.com>2015-08-27 02:20:43 +1000
commit1963c3ff10c483bd8e3dec9cbd88cce54656b029 (patch)
treea81011856078d28d9fb51debed61de44ed199b7b /gtk2_ardour/editor_canvas_events.cc
parent1387e756def903c7987941bab6b50c1f25ab7141 (diff)
Allow creation of region gain points by clicking on a line.
- Also fixes new AutomationLine points having huge offsets on creation via line click (window vs canvas event sample).
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r--gtk2_ardour/editor_canvas_events.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index adb896af8b..ea54cb4098 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -688,17 +688,18 @@ bool
Editor::canvas_line_event (GdkEvent *event, ArdourCanvas::Item* item, AutomationLine* al)
{
ItemType type;
-
- if (dynamic_cast<AudioRegionGainLine*> (al) != 0) {
+ AudioRegionGainLine* gl;
+ if ((gl = dynamic_cast<AudioRegionGainLine*> (al)) != 0) {
type = GainLineItem;
+ clicked_regionview = &gl->region_view ();
} else {
type = AutomationLineItem;
+ clicked_regionview = 0;
}
clicked_control_point = 0;
clicked_axisview = &al->trackview;
clicked_routeview = dynamic_cast<RouteTimeAxisView*>(clicked_axisview);
- clicked_regionview = 0;
return typed_event (item, event, type);
}