diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-31 02:40:08 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-31 02:40:08 +0000 |
commit | 71c94e69438c7c282b2dcac5ead080119944b290 (patch) | |
tree | 17bc6b75ff24c0eca6a7a45043f2c9d11cc2ff0c /gtk2_ardour/editor_tempodisplay.cc | |
parent | 74df5d49c8ff42c05d7eb9300c3a9f9a7257e694 (diff) |
massive changes in automation state handling, not entirely complete; some bug fixes for automation line drawing
git-svn-id: svn://localhost/ardour2/trunk@1034 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 177f82bd44..3285d44e01 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -96,6 +96,10 @@ Editor::draw_metric_marks (const Metrics& metrics) void Editor::tempo_map_changed (Change ignored) { + if (!session) { + return; + } + ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored)); BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame @@ -112,13 +116,13 @@ Editor::tempo_map_changed (Change ignored) previous_beat.ticks = 0; if (session->tempo_map().meter_at(leftmost_frame + current_page_frames()).beats_per_bar () > next_beat.beats + 1) { - next_beat.beats += 1; + next_beat.beats += 1; } else { - next_beat.bars += 1; - next_beat.beats = 1; + next_beat.bars += 1; + next_beat.beats = 1; } next_beat.ticks = 0; - + if (current_bbt_points) { delete current_bbt_points; current_bbt_points = 0; |