diff --git a/gtk2_ardour/cue_editor.cc b/gtk2_ardour/cue_editor.cc index 4c731a5767..cec71ef348 100644 --- a/gtk2_ardour/cue_editor.cc +++ b/gtk2_ardour/cue_editor.cc @@ -298,24 +298,6 @@ CueEditor::get_canvas_cursor () const return nullptr; } -std::shared_ptr -CueEditor::start_local_tempo_map (std::shared_ptr map) -{ - EC_LOCAL_TEMPO_SCOPE; - - std::shared_ptr tmp = Temporal::TempoMap::use(); - Temporal::TempoMap::set (map); - return tmp; -} - -void -CueEditor::end_local_tempo_map (std::shared_ptr map) -{ - EC_LOCAL_TEMPO_SCOPE; - - Temporal::TempoMap::set (map); -} - void CueEditor::do_undo (uint32_t n) { @@ -1186,6 +1168,9 @@ CueEditor::set_region (std::shared_ptr r) _region = r; + std::shared_ptr tmap (new TempoMap (_region->tempo(), _region->meter())); + start_local_tempo_map (tmap); + if (!get_canvas()->is_visible()) { _visible_pending_region = r; } else { @@ -1414,8 +1399,7 @@ CueEditor::idle_data_captured () void CueEditor::unset (bool trigger_too) { - EC_LOCAL_TEMPO_SCOPE; - + end_local_tempo_map (); _history.clear (); history_connection.disconnect(); _update_connection.disconnect(); diff --git a/gtk2_ardour/cue_editor.h b/gtk2_ardour/cue_editor.h index 95c62e93df..9f4335aa0d 100644 --- a/gtk2_ardour/cue_editor.h +++ b/gtk2_ardour/cue_editor.h @@ -113,9 +113,6 @@ class CueEditor : public EditingContext, public PBD::HistoryOwner std::vector filter_to_unique_midi_region_views (RegionSelection const & ms) const; - std::shared_ptr start_local_tempo_map (std::shared_ptr); - void end_local_tempo_map (std::shared_ptr); - void scrolled (); bool canvas_pre_event (GdkEvent*); void catch_pending_show_region ();