mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 22:56:32 +01:00
click (no drag) on automation line now adds a new control point on the line (not fully checked for precision)
This commit is contained in:
parent
efc3c8be42
commit
39859e47c7
1 changed files with 17 additions and 3 deletions
|
|
@ -3275,10 +3275,24 @@ LineDrag::motion (GdkEvent* event, bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LineDrag::finished (GdkEvent* event, bool)
|
LineDrag::finished (GdkEvent* event, bool movement_occured)
|
||||||
{
|
{
|
||||||
motion (event, false);
|
if (movement_occured) {
|
||||||
_line->end_drag (false, 0);
|
motion (event, false);
|
||||||
|
_line->end_drag (false, 0);
|
||||||
|
} else {
|
||||||
|
/* add a new control point on the line */
|
||||||
|
|
||||||
|
AutomationTimeAxisView* atv;
|
||||||
|
|
||||||
|
_line->end_drag (false, 0);
|
||||||
|
|
||||||
|
if ((atv = dynamic_cast<AutomationTimeAxisView*>(_editor->clicked_axisview)) != 0) {
|
||||||
|
framepos_t where = _editor->event_frame (event, 0, 0);
|
||||||
|
atv->add_automation_event (event, where, event->button.y, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_editor->session()->commit_reversible_command ();
|
_editor->session()->commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue