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
This commit is contained in:
Paul Davis 2008-04-01 19:53:44 +00:00
parent d4ca31ada8
commit 5fae2ae363

View file

@ -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);