mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +08:00
Show print job context menu if state == "error"
Contributes to CL-1175
This commit is contained in:
parent
5d2a914180
commit
673734ee12
@ -53,7 +53,7 @@ Item
|
|||||||
}
|
}
|
||||||
text: catalog.i18nc("@label", "Move to top");
|
text: catalog.i18nc("@label", "Move to top");
|
||||||
visible: {
|
visible: {
|
||||||
if (printJob && printJob.state == "queued" && !isAssigned(printJob)) {
|
if (printJob && (printJob.state == "queued" || printJob.state == "error") && !isAssigned(printJob)) {
|
||||||
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
||||||
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ Item
|
|||||||
if (!printJob) {
|
if (!printJob) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var states = ["queued", "sent_to_printer"];
|
var states = ["queued", "error", "sent_to_printer"];
|
||||||
return states.indexOf(printJob.state) !== -1;
|
return states.indexOf(printJob.state) !== -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,6 +217,14 @@ Item
|
|||||||
height: 32 * screenScaleFactor // TODO: Theme!
|
height: 32 * screenScaleFactor // TODO: Theme!
|
||||||
enabled: !cloudConnection
|
enabled: !cloudConnection
|
||||||
onClicked: enabled ? contextMenu.switchPopupState() : {}
|
onClicked: enabled ? contextMenu.switchPopupState() : {}
|
||||||
|
visible:
|
||||||
|
{
|
||||||
|
if (!printJob) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
var states = ["queued", "error", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
|
||||||
|
return states.indexOf(printJob.state) !== -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MonitorContextMenu
|
MonitorContextMenu
|
||||||
|
@ -179,7 +179,7 @@ Item
|
|||||||
if (!printer || !printer.activePrintJob) {
|
if (!printer || !printer.activePrintJob) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
var states = ["queued", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
|
var states = ["queued", "error", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"]
|
||||||
return states.indexOf(printer.activePrintJob.state) !== -1
|
return states.indexOf(printer.activePrintJob.state) !== -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user