mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-01 16:24:41 +08:00
CL-473 Print job duration time has the wrong format. Use the Cura format from the Prepare tab.
Subtask of CL-457 Cura plugin: primary visual improvements
This commit is contained in:
parent
eb85c28c10
commit
553a309d23
@ -17,6 +17,7 @@ from UM.Logger import Logger
|
||||
from UM.Message import Message
|
||||
from UM.OutputDevice import OutputDeviceError
|
||||
from UM.i18n import i18nCatalog
|
||||
from UM.Qt.Duration import Duration, DurationFormat
|
||||
|
||||
from . import NetworkPrinterOutputDevice
|
||||
|
||||
@ -652,3 +653,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
||||
self._reply.abort()
|
||||
self._reply = None
|
||||
Application.getInstance().showPrintMonitor.emit(False)
|
||||
|
||||
@pyqtSlot(int, result=str)
|
||||
def formatDuration(self, seconds):
|
||||
return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
|
||||
|
@ -14,14 +14,7 @@ Rectangle
|
||||
|
||||
function getPrettyTime(time)
|
||||
{
|
||||
var hours = Math.floor(time / 3600)
|
||||
time -= hours * 3600
|
||||
var minutes = Math.floor(time / 60);
|
||||
time -= minutes * 60
|
||||
var seconds = Math.floor(time);
|
||||
|
||||
var finalTime = strPadLeft(hours, "0", 2) + ':' + strPadLeft(minutes,'0',2)+ ':' + strPadLeft(seconds,'0',2);
|
||||
return finalTime;
|
||||
return OutputDevice.formatDuration(time)
|
||||
}
|
||||
|
||||
function formatPrintJobPercent(printJob)
|
||||
|
Loading…
x
Reference in New Issue
Block a user