From e2c5a0777bc21f266b8328148fd3acf8849e8aac Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 25 Oct 2022 11:10:01 -0600 Subject: [PATCH] GUI companion to 4dc582321 - make tempo marker drag smoother/more efficient No reason to do a "mid tempo" update if the marker did not move --- gtk2_ardour/editor_drag.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index cc5e2cc040..1b90bf56ec 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3304,11 +3304,17 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move) } else if (_movable) { timepos_t pos = adjusted_current_time (event); - map->move_tempo (_marker->tempo(), pos, false); - show_verbose_cursor_time (_marker->tempo().time()); - } - _editor->mid_tempo_change (Editor::TempoChanged); + /* This relies on the tempo map to round up the beat postiion + * and see if that differs from the current position (tempo + * markers only allowed on beat) + */ + + if (map->move_tempo (_marker->tempo(), pos, false)) { + _editor->mid_tempo_change (Editor::TempoChanged); + show_verbose_cursor_time (_marker->tempo().time()); + } + } }