mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Fixed broken printjob state in machines page
CL-541
This commit is contained in:
parent
1986677276
commit
c2935759e8
1 changed files with 9 additions and 5 deletions
|
@ -143,7 +143,7 @@ UM.ManagementPage
|
|||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property var connectedPrinter: printerConnected ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||
|
||||
property var printJob: connectedPrinter != null ? connectedPrinter.activePrintJob: null
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Printer type:")
|
||||
|
@ -178,7 +178,12 @@ UM.ManagementPage
|
|||
return "";
|
||||
}
|
||||
|
||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||
if (machineInfo.printJob == null)
|
||||
{
|
||||
return catalog.i18nc("@label:MonitorStatus", "Waiting for a printjob");
|
||||
}
|
||||
|
||||
switch(machineInfo.printJob.state)
|
||||
{
|
||||
case "printing":
|
||||
return catalog.i18nc("@label:MonitorStatus", "Printing...");
|
||||
|
@ -194,10 +199,9 @@ UM.ManagementPage
|
|||
return catalog.i18nc("@label:MonitorStatus", "In maintenance. Please check the printer");
|
||||
case "abort": // note sure if this jobState actually occurs in the wild
|
||||
return catalog.i18nc("@label:MonitorStatus", "Aborting print...");
|
||||
case "ready": // ready to print or getting ready
|
||||
case "": // ready to print or getting ready
|
||||
return catalog.i18nc("@label:MonitorStatus", "Waiting for a printjob");
|
||||
|
||||
}
|
||||
return ""
|
||||
}
|
||||
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId && machineInfo.printerAcceptsCommands
|
||||
wrapMode: Text.WordWrap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue