region gain and MIDI CC freehand line drawing

This involved a significant change in event handling for automation region views,
but it brings it into line with how it works for other things. On button press
we initiate a drag, then if no motion occurs, the Drag returns false during
finalization, and only then do we continue through Editor::button_release_handler()
to eventually end up in ::add_automation_event().

Although it is a substantial change, the fact that it now works the same
way for audio regions, automation regions and automation tracks seems
like a definite plus.
This commit is contained in:
Paul Davis 2023-09-30 11:09:01 -06:00
parent 6b64ebdb27
commit 18819a48a9
11 changed files with 270 additions and 46 deletions

View file

@ -79,11 +79,12 @@ AutomationStreamView::add_region_view_internal (std::shared_ptr<Region> region,
return 0;
}
std::shared_ptr<AutomationList> list;
const std::shared_ptr<AutomationControl> control = std::dynamic_pointer_cast<AutomationControl> (
region->control (_automation_view.parameter(), true)
);
std::shared_ptr<AutomationList> list;
if (control) {
list = std::dynamic_pointer_cast<AutomationList>(control->list());
if (control->list() && !list) {