From dff9e60c7f213277f6b4682cec919eb86ad66a93 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 7 Dec 2014 19:54:47 -0500 Subject: Draw region automation with draw in either mode. Perhaps debatable if contents should be edited when not in internal mode whatsoever, but consistent with audio region gain and track automation. It's less of a problem with the draw tool than, say, object since drawing stuff is its entire purpose. --- gtk2_ardour/automation_region_view.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour/automation_region_view.cc') diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index a50044db19..61b0f1f39c 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -103,13 +103,14 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev) return false; } - if (!trackview.editor().internal_editing()) { + PublicEditor& e = trackview.editor (); + + if (!trackview.editor().internal_editing() && + e.current_mouse_mode() != Editing::MouseDraw) { // not in internal edit mode, so just act like a normal region return RegionView::canvas_group_event (ev); } - PublicEditor& e = trackview.editor (); - if (ev->type == GDK_BUTTON_PRESS && e.current_mouse_mode() == Editing::MouseObject) { /* XXX: icky dcast to Editor */ @@ -122,7 +123,7 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev) e.drags()->motion_handler(ev, false); return true; - } else if (ev->type == GDK_BUTTON_RELEASE) { + } 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 && -- cgit v1.2.3