From 04d367fdfec82ec635921aef9693625115f4398f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 22 Sep 2022 16:16:20 -0600 Subject: [PATCH] midi note drawing: fix snap used to place ghost note --- gtk2_ardour/midi_region_view.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index f9291b89c1..b9c0391de0 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -4086,7 +4086,8 @@ MidiRegionView::update_ghost_note (double x, double y, uint32_t state) samplepos_t const unsnapped_sample = editor.pixel_to_sample (global_x); Temporal::timepos_t snapped_pos = timepos_t (unsnapped_sample); - editor.snap_to (snapped_pos, RoundDownAlways, SnapToGrid_Scaled); + editor.snap_to (snapped_pos, RoundNearest, SnapToGrid_Scaled); + const Temporal::Beats snapped_beats = _region->absolute_time_to_region_beats(snapped_pos);