From f1df7b125bbd324f8e097ff296e3126b5183dcdb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 7 Jan 2012 15:10:31 +0000 Subject: [PATCH] snap tempo marker drags to the nearest beat git-svn-id: svn://localhost/ardour2/branches/3.0@11183 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_drag.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 830efbfeef..7d088d0684 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -2093,10 +2093,11 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred) motion (event, false); + TempoMap& map (_editor->session()->tempo_map()); + framepos_t beat_time = map.round_to_beat (last_pointer_frame(), 0); Timecode::BBT_Time when; - TempoMap& map (_editor->session()->tempo_map()); - map.bbt_time (last_pointer_frame(), when); + map.bbt_time (beat_time, when); if (_copy == true) { _editor->begin_reversible_command (_("copy tempo mark"));