summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-07 15:10:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-07 15:10:31 +0000
commitf1df7b125bbd324f8e097ff296e3126b5183dcdb (patch)
treef04e556dea89ee82ff6eb6bd5788dbe375bb7cff /gtk2_ardour
parentba00aba51c779f2cd16dffb52808d3930c2f1eaf (diff)
snap tempo marker drags to the nearest beat
git-svn-id: svn://localhost/ardour2/branches/3.0@11183 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc5
1 files 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"));