13
0

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.
This commit is contained in:
David Robillard 2014-12-07 19:54:47 -05:00
parent 603748d68a
commit dff9e60c7f

View File

@ -103,13 +103,14 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev)
return false; 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 // not in internal edit mode, so just act like a normal region
return RegionView::canvas_group_event (ev); return RegionView::canvas_group_event (ev);
} }
PublicEditor& e = trackview.editor ();
if (ev->type == GDK_BUTTON_PRESS && e.current_mouse_mode() == Editing::MouseObject) { if (ev->type == GDK_BUTTON_PRESS && e.current_mouse_mode() == Editing::MouseObject) {
/* XXX: icky dcast to Editor */ /* XXX: icky dcast to Editor */
@ -122,7 +123,7 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev)
e.drags()->motion_handler(ev, false); e.drags()->motion_handler(ev, false);
return true; 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)) { if (e.drags()->end_grab (ev)) {
return true; return true;
} else if (e.current_mouse_mode() != Editing::MouseDraw && } else if (e.current_mouse_mode() != Editing::MouseDraw &&