diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index f13e38cbef..adc61813e4 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -112,6 +112,7 @@ AutomationLine::AutomationLine (const string& name, line = new ArdourCanvas::PolyLine (group); CANVAS_DEBUG_NAME (line, "region gain envelope line"); line->set_data ("line", this); + line->set_data ("trackview", &trackview); line->set_outline_width (2.0); line->set_covers_threshold (4.0); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 653e70245d..bda241b2ec 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -689,7 +689,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it break; case AutomationLineItem: - if (eff_mouse_mode != MouseRange) { + if (eff_mouse_mode != MouseRange && eff_mouse_mode != MouseDraw) { AutomationLine* al = reinterpret_cast (item->get_data ("line")); std::list selectables; double mx = event->button.x; @@ -1356,6 +1356,8 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT break; } + case AutomationLineItem: + /* fallthrough */ case AutomationTrackItem: { AutomationTimeAxisView* atv = static_cast (item->get_data ("trackview")); @@ -1365,10 +1367,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT } break; - case AutomationLineItem: - _drags->set (new LineDrag (this, item), event); - break; - case NoteItem: if ((note = reinterpret_cast(item->get_data ("notebase")))) { if (note->big_enough_to_trim() && note->mouse_near_ends()) {