summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-04-01 19:53:44 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-04-01 19:53:44 +0000
commit5fae2ae363daf4360ca3b3ce7be0e34792dd21ee (patch)
treebd40fa918e8f64ac2637f31700ee33fc9debfb2d
parentd4ca31ada80a60a12461245feeb4aa7316a2695a (diff)
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
-rw-r--r--gtk2_ardour/audio_clock.cc9
1 files changed, 9 insertions, 0 deletions
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);