Timestamp on pushButtonJumpToMarker(A|B) should always display 3 digits for ms

Started by eumagga0x2a, September 20, 2016, 09:47:18 AM

Previous topic - Next topic

eumagga0x2a

Currently, buttons for "jump to marker A" and "jump to marker B" show timestamps without leading zero for milliseconds, e.g. 00:22:03.064 gets displayed as "00:22:03.64" which is simply incorrect. Trivial patch attached.

diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp b/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
index 82b0018..f5ec0c5 100644
--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp
@@ -1353,12 +1353,12 @@ void UI_setMarkers(uint64_t a, uint64_t b)

     timems=(uint32_t)(a);
     ms2time(timems,&hh,&mm,&ss,&ms);
-    snprintf(text,79,"%02" PRIu32":%02" PRIu32":%02" PRIu32".%02" PRIu32,hh,mm,ss,ms);
+    snprintf(text,79,"%02" PRIu32":%02" PRIu32":%02" PRIu32".%03" PRIu32,hh,mm,ss,ms);
     WIDGET(pushButtonJumpToMarkerA)->setText(text);

     timems=(uint32_t)(b);
     ms2time(timems,&hh,&mm,&ss,&ms);
-    snprintf(text,79,"%02" PRIu32":%02" PRIu32":%02" PRIu32".%02" PRIu32,hh,mm,ss,ms);
+    snprintf(text,79,"%02" PRIu32":%02" PRIu32":%02" PRIu32".%03" PRIu32,hh,mm,ss,ms);
     WIDGET(pushButtonJumpToMarkerB)->setText(text);

     slider->setMarkers(absoluteA, absoluteB);

mean

Why dont you ask for pull request on github ?
You do the change, i'll merge it if it's ok, takes 5 sec and i cannot miss it


eumagga0x2a

Thanks, I'll think about it. I don't have a GitHub account (yet) and I am still merely a somewhat experienced bug reporter with zero programming skills (just developing a bit of c++ reading comprehension) thus of very limited use beyond translation tasks (and even that was purely learning-by-doing), there won't be many pull requests from me.