diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 189e8c8c28..73ea53b4b8 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1875,6 +1875,7 @@ private: void update_tempo_curves (double min_tempo, double max_tempo, samplecnt_t sr); void tempo_map_changed (); + void tempo_map_visual_update (); void redisplay_grid (bool immediate_redraw); diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index f8678681c1..77d5b48822 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -449,12 +449,19 @@ Editor::update_tempo_curves (double min_tempo, double max_tempo, samplecnt_t sr) void Editor::tempo_map_changed () +{ + TempoMap::fetch (); + tempo_map_visual_update (); +} + +void +Editor::tempo_map_visual_update () { TempoMap::Metrics metrics; - TempoMap::fetch()->get_metrics (metrics); + TempoMap::use()->get_metrics (metrics); draw_metric_marks (metrics); - compute_bbt_ruler_scale (_leftmost_sample, _leftmost_sample + current_page_samples()); + draw_tempo_marks (); update_tempo_based_rulers (); maybe_draw_grid_lines (); } @@ -839,5 +846,7 @@ void Editor::mid_tempo_change () { std::cerr << "============== MID TEMPO\n"; - draw_tempo_marks (); + TempoMap::SharedPtr map (TempoMap::use()); + map->dump (std::cerr); + tempo_map_visual_update (); }