diff options
author | David Robillard <d@drobilla.net> | 2009-10-26 22:01:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-26 22:01:46 +0000 |
commit | 93fccfca304425835171e994e98c1cb09c816521 (patch) | |
tree | 1718b316a07cb79b09aa909461b9a524a2836029 /gtk2_ardour/automation_region_view.cc | |
parent | f0d0ad687d74d1fe87799dcb4e9427f4e5681638 (diff) |
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
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r-- | gtk2_ardour/automation_region_view.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 369d38dd27..0e88050edc 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -83,7 +83,6 @@ bool AutomationRegionView::canvas_event(GdkEvent* ev) { if (ev->type == GDK_BUTTON_RELEASE) { - const nframes_t when = trackview.editor().pixel_to_frame((nframes_t)ev->button.x) - _region->position(); add_automation_event(ev, when, ev->button.y); @@ -104,7 +103,7 @@ AutomationRegionView::add_automation_event (GdkEvent* /*event*/, nframes_t when, } assert(_line); - double x = 0; + double x = when; AutomationTimeAxisView* const view = automation_view(); 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")); 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(); view->session().commit_reversible_command (new MementoCommand<ARDOUR::AutomationList>( |