From 88bed837c0a4ca8a1c486230ddeb6f098e270345 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 22 Mar 2021 16:01:57 -0600 Subject: [PATCH] fix deadlock during tempo marker dragging, and don't start a tempo map update if a tempo point is inactive --- gtk2_ardour/editor_drag.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index ccb205c5e3..8e67e3e137 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3562,11 +3562,11 @@ TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor) show_verbose_cursor_text (_("inactive")); } else { show_verbose_cursor_time (adjusted_current_time (event)); + + /* setup thread-local tempo map ptr as a writable copy */ + + TempoMap::fetch_writable (); } - - /* setup thread-local tempo map ptr as a writable copy */ - - TempoMap::fetch_writable (); } void @@ -3686,22 +3686,21 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move) void TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred) { - // _point->end_float (); - if (!_marker->tempo().active()) { return; } if (!movement_occurred) { - if (was_double_click()) { - _editor->edit_tempo_marker (*_marker); - } - /* reset the per-thread tempo map ptr back to the current * official version */ TempoMap::abort_update (); + + if (was_double_click()) { + _editor->edit_tempo_marker (*_marker); + } + return; }