zero-pad seconds field of verbose canvas cursor, fixes #3216
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 2 Jun 2010 13:01:22 +0000 (13:01 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 2 Jun 2010 13:01:22 +0000 (13:01 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7206 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_mouse.cc

index f9d06f03c7969139e774f13f0169e8b887f1e655..2cbf0c1a8598f50c2b4180ca2b46f9b363dad273 100644 (file)
@@ -2014,7 +2014,7 @@ Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos,
                mins = frame / (frame_rate * 60);
                frame = frame % (frame_rate * 60);
                secs = (float) frame / (float) frame_rate;
-               snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%.4f", hours, mins, secs);
+               snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%07.4f", hours, mins, secs);
                break;
 
        default:
@@ -2095,7 +2095,7 @@ Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double
                mins = distance / (frame_rate * 60);
                distance = distance % (frame_rate * 60);
                secs = (float) distance / (float) frame_rate;
-               snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%.4f", hours, mins, secs);
+               snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%07.4f", hours, mins, secs);
                break;
 
        default: