diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index d30cceccb7..38a98aac72 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -132,30 +132,10 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev) PublicEditor& e = trackview.editor (); - if (!trackview.editor().internal_editing()) { - // not in internal edit mode, so just act like a normal region - return RegionView::canvas_group_event (ev); - } - - if (ev->type == GDK_BUTTON_PRESS && e.current_mouse_mode() == Editing::MouseContent) { - - /* XXX: icky dcast to Editor */ - e.drags()->set (new EditorRubberbandSelectDrag (dynamic_cast (&e), group), ev); - e.drags()->start_grab (ev); - return true; - - } else if (ev->type == GDK_MOTION_NOTIFY && e.drags()->active()) { - /* we probably shouldn't have to handle this here, but... */ - e.drags()->motion_handler(ev, false); - return true; - - } else if (ev->type == GDK_BUTTON_RELEASE && e.current_mouse_mode() == Editing::MouseDraw) { - if (e.drags()->end_grab (ev)) { - return true; - } else if (e.current_mouse_mode() != Editing::MouseDraw && - e.current_mouse_mode() != Editing::MouseContent) { - return RegionView::canvas_group_event (ev); - } + if (trackview.editor().internal_editing() && + ev->type == GDK_BUTTON_RELEASE && + e.current_mouse_mode() == Editing::MouseDraw && + !e.drags()->active()) { double x = ev->button.x; double y = ev->button.y; diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 8ec03d778d..abb8cc56a8 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -750,6 +750,14 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT return true; break; + case RegionItem: + if (dynamic_cast(clicked_regionview)) { + /* rubberband drag to select automation points */ + _drags->set (new EditorRubberbandSelectDrag (this, item), event); + return true; + } + break; + default: break; }