Fix adding control points to MIDI 'automation' regions.
This one wins the award for most time spent finding really stupid tiny little error. git-svn-id: svn://localhost/ardour2/branches/3.0@5932 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f0d0ad687d
commit
93fccfca30
@ -83,7 +83,6 @@ bool
|
|||||||
AutomationRegionView::canvas_event(GdkEvent* ev)
|
AutomationRegionView::canvas_event(GdkEvent* ev)
|
||||||
{
|
{
|
||||||
if (ev->type == GDK_BUTTON_RELEASE) {
|
if (ev->type == GDK_BUTTON_RELEASE) {
|
||||||
|
|
||||||
const nframes_t when = trackview.editor().pixel_to_frame((nframes_t)ev->button.x)
|
const nframes_t when = trackview.editor().pixel_to_frame((nframes_t)ev->button.x)
|
||||||
- _region->position();
|
- _region->position();
|
||||||
add_automation_event(ev, when, ev->button.y);
|
add_automation_event(ev, when, ev->button.y);
|
||||||
@ -104,7 +103,7 @@ AutomationRegionView::add_automation_event (GdkEvent* /*event*/, nframes_t when,
|
|||||||
}
|
}
|
||||||
assert(_line);
|
assert(_line);
|
||||||
|
|
||||||
double x = 0;
|
double x = when;
|
||||||
AutomationTimeAxisView* const view = automation_view();
|
AutomationTimeAxisView* const view = automation_view();
|
||||||
|
|
||||||
view->canvas_display()->w2i (x, y);
|
view->canvas_display()->w2i (x, y);
|
||||||
@ -121,7 +120,7 @@ AutomationRegionView::add_automation_event (GdkEvent* /*event*/, nframes_t when,
|
|||||||
view->session().begin_reversible_command (_("add automation event"));
|
view->session().begin_reversible_command (_("add automation event"));
|
||||||
XMLNode& before = _line->the_list()->get_state();
|
XMLNode& before = _line->the_list()->get_state();
|
||||||
|
|
||||||
_line->the_list()->add (when, y);
|
_line->the_list()->add (x, y);
|
||||||
|
|
||||||
XMLNode& after = _line->the_list()->get_state();
|
XMLNode& after = _line->the_list()->get_state();
|
||||||
view->session().commit_reversible_command (new MementoCommand<ARDOUR::AutomationList>(
|
view->session().commit_reversible_command (new MementoCommand<ARDOUR::AutomationList>(
|
||||||
|
Loading…
Reference in New Issue
Block a user