Fix rounding of thousandths of microseconds in duration editor
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 27 Jun 2018 18:13:31 +0300
changeset 2235 d3751d43c390
parent 2234 3da336a9664c
child 2236 edd8639f16b7
Fix rounding of thousandths of microseconds in duration editor
dialogs/DurationEditorDialog.py
--- a/dialogs/DurationEditorDialog.py	Wed Jun 27 17:13:06 2018 +0300
+++ b/dialogs/DurationEditorDialog.py	Wed Jun 27 18:13:31 2018 +0300
@@ -147,7 +147,7 @@
                 duration += format % value
                 not_null = True
 
-        duration += "%gms" % (milliseconds % SECOND)
+        duration += ("%f" % (milliseconds % SECOND)).rstrip("0").rstrip(".") + "ms"
         return duration
 
     def OnOK(self, event):