mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 09:35:53 +08:00
Changed rounding of prettyTime by accident
This commit is contained in:
parent
d8853b8a98
commit
af89209cde
@ -122,7 +122,7 @@ Column
|
|||||||
{
|
{
|
||||||
label: catalog.i18nc("@label", "Printing Time")
|
label: catalog.i18nc("@label", "Printing Time")
|
||||||
value: activePrintJob != null ? getPrettyTime(activePrintJob.timeTotal) : ""
|
value: activePrintJob != null ? getPrettyTime(activePrintJob.timeTotal) : ""
|
||||||
width:base.width
|
width: base.width
|
||||||
visible: activePrinter != null
|
visible: activePrinter != null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,11 +64,11 @@ Rectangle
|
|||||||
|
|
||||||
function getPrettyTime(time)
|
function getPrettyTime(time)
|
||||||
{
|
{
|
||||||
var hours = Math.round(time / 3600)
|
var hours = Math.floor(time / 3600)
|
||||||
time -= hours * 3600
|
time -= hours * 3600
|
||||||
var minutes = Math.round(time / 60);
|
var minutes = Math.floor(time / 60);
|
||||||
time -= minutes * 60
|
time -= minutes * 60
|
||||||
var seconds = Math.round(time);
|
var seconds = Math.floor(time);
|
||||||
|
|
||||||
var finalTime = strPadLeft(hours, "0", 2) + ':' + strPadLeft(minutes,'0',2)+ ':' + strPadLeft(seconds,'0',2);
|
var finalTime = strPadLeft(hours, "0", 2) + ':' + strPadLeft(minutes,'0',2)+ ':' + strPadLeft(seconds,'0',2);
|
||||||
return finalTime;
|
return finalTime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user