From f321dd4dacd71e1f620064197fb9bea57a2126b8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 19 Jan 2021 14:54:13 -0700 Subject: [PATCH] remove NUTEMPO #warning (comment explains more) --- gtk2_ardour/automation_region_view.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index cf781581bc..4616b20bbd 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -156,8 +156,15 @@ AutomationRegionView::canvas_group_event (GdkEvent* ev) /* guard points only if primary modifier is used */ bool with_guard_points = Gtkmm2ext::Keyboard::modifier_state_equals (ev->button.state, Gtkmm2ext::Keyboard::PrimaryModifier); -#warning NUTEMPO what if this automation list is not using audio time? - add_automation_event (ev, timepos_t (e.pixel_to_sample (x) - _region->position_sample() + _region->start_sample()), y, with_guard_points); + + /* the time domain doesn't matter here, because the automation + * list will force the position to its own time domain when + * adding the point. + */ + + const timepos_t pos = timepos_t (e.pixel_to_sample (x) - _region->position_sample() + _region->start_sample()); + + add_automation_event (ev, pos, y, with_guard_points); return true; }