From a0dc539d7010b0bbc82281c8d9c29313d719b683 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 10 Apr 2023 10:03:21 +0200 Subject: [PATCH] Set thread-local tempo-map to write-copy Use the new map that is being edited for lookups while changing the map in the in the GUI. This can changes directly visible as the map is being edited. This used to be done directly with the fetch_writable() API --- gtk2_ardour/editor_tempodisplay.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 3ea4e09b0f..eb2ddeca1d 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -757,6 +757,7 @@ Temporal::TempoMap::WritableSharedPtr Editor::begin_tempo_mapping () { TempoMap::WritableSharedPtr wmap = TempoMap::write_copy (); + TempoMap::set (wmap); reassociate_metric_markers (wmap); (void) Temporal::DomainSwapInformation::start (Temporal::BeatTime); _session->globally_change_time_domain (Temporal::BeatTime, Temporal::AudioTime); @@ -788,6 +789,7 @@ Temporal::TempoMap::WritableSharedPtr Editor::begin_tempo_map_edit () { TempoMap::WritableSharedPtr wmap = TempoMap::write_copy (); + TempoMap::set (wmap); reassociate_metric_markers (wmap); return wmap; }