From 5fae2ae363daf4360ca3b3ce7be0e34792dd21ee Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 1 Apr 2008 19:53:44 +0000 Subject: [PATCH] duration clocks are rooted at 0|0 in BBT time, not 1|1 git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3206 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_clock.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index bbdebf097d..b00c0bfeab 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -634,6 +634,15 @@ AudioClock::set_bbt (nframes_t when, bool force) BBT_Time bbt; session->tempo_map().bbt_time (when, bbt); + + /* handle a common case */ + + if (is_duration && when == 0) { + bbt.bars = 0; + bbt.beats = 0; + + } + sprintf (buf, "%03" PRIu32, bbt.bars); bars_label.set_text (buf); sprintf (buf, "%02" PRIu32, bbt.beats);