diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 10cc564558..f3c6b3ec45 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1730,6 +1730,8 @@ private: Temporal::TempoMap::WritableSharedPtr begin_tempo_map_edit (); void abort_tempo_map_edit (); void commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr&); + void mid_tempo_per_track_update (TimeAxisView&); + void mid_tempo_per_region_update (RegionView*); bool ignore_map_change; enum MidTempoChanges { diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index f9ec4fe9ff..627af2cf03 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -57,6 +57,7 @@ #include "gui_thread.h" #include "time_axis_view.h" #include "grid_lines.h" +#include "region_view.h" #include "ui_config.h" #include "pbd/i18n.h" @@ -761,4 +762,31 @@ Editor::mid_tempo_change (MidTempoChanges what_changed) update_tempo_based_rulers (); maybe_draw_grid_lines (); + + foreach_time_axis_view (sigc::mem_fun (*this, &Editor::mid_tempo_per_track_update)); + +} + +void +Editor::mid_tempo_per_track_update (TimeAxisView& tav) +{ + MidiTimeAxisView* mtav = dynamic_cast (&tav); + + if (!mtav) { + return; + } + + MidiStreamView* msv = mtav->midi_view(); + + if (!msv) { + return; + } + + msv->foreach_regionview (sigc::mem_fun (*this, &Editor::mid_tempo_per_region_update)); +} + +void +Editor::mid_tempo_per_region_update (RegionView* rv) +{ + rv->redisplay (true); }