summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-12-23 05:58:49 +1100
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:09 +1000
commit340bd42c62a10578eb0314faf67eff115b975c2a (patch)
treef0d868311715690bdd8b53628877014a30f0dbbe /gtk2_ardour/editor_tempodisplay.cc
parent7898435d3f94355fa0996dc9f85b3bc1ef173585 (diff)
Tempo ramps - allow live updating of tempo markers.
- all a bit slow, but should be ok once we can lock markers to frames.
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index 2d5a3e47d5..2794051265 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -101,6 +101,7 @@ Editor::draw_metric_marks (const Metrics& metrics)
}
+
void
Editor::tempo_map_changed (const PropertyChange& /*ignored*/)
{
@@ -123,6 +124,27 @@ Editor::tempo_map_changed (const PropertyChange& /*ignored*/)
}
void
+Editor::marker_position_changed ()
+{
+// yes its identical...
+ if (!_session) {
+ return;
+ }
+
+ ENSURE_GUI_THREAD (*this, &Editor::tempo_map_changed);
+
+ if (tempo_lines) {
+ tempo_lines->tempo_map_changed();
+ }
+
+ std::vector<TempoMap::BBTPoint> grid;
+ compute_current_bbt_points (grid, leftmost_frame, leftmost_frame + current_page_samples());
+ _session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks); // redraw metric markers
+ draw_measures (grid);
+ update_tempo_based_rulers (grid);
+}
+
+void
Editor::redisplay_tempo (bool immediate_redraw)
{
if (!_session) {