Draw region automation with draw in either mode.
authorDavid Robillard <d@drobilla.net>
Mon, 8 Dec 2014 00:54:47 +0000 (19:54 -0500)
committerDavid Robillard <d@drobilla.net>
Mon, 8 Dec 2014 01:37:53 +0000 (20:37 -0500)
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

index a50044db19a3216d23b0282049819e616aa20b1c..61b0f1f39cbf0e78a8c95049c70c49a4a6e7e4e3 100644 (file)
@@ -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 &&