From 76b92cec999d7c133b60bf7ed0a89478fe058094 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 30 Sep 2016 17:07:33 -0700 Subject: [PATCH] visualizer-ticks: don't render 00:00:00.0000 If we are at the beginning of a capture, we would end up drawing the msec because h/m/s were all zero. Make sure we also have a non-zero msec or just fallback to regular timestamps. --- lib/sp-visualizer-ticks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sp-visualizer-ticks.c b/lib/sp-visualizer-ticks.c index 9d637c15..c736dcd8 100644 --- a/lib/sp-visualizer-ticks.c +++ b/lib/sp-visualizer-ticks.c @@ -110,7 +110,7 @@ update_label_text (PangoLayout *layout, time %= NSEC_PER_SEC; } - if (want_msec || (!hours && !min && !sec)) + if (want_msec || (!hours && !min && !sec && msec)) { if (hours > 0) str = g_strdup_printf ("%02u:%02u:%02u.%04u", hours, min, sec, msec);