Merge pull request #5215 from Ultimaker/CL-1175_context_menu_for_cant_print_jobs

CL-1175 Context menu for cant print jobs
This commit is contained in:
Simon Edwards 2019-01-25 10:53:15 +01:00 committed by GitHub
commit 064e61c262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ Item
}
text: catalog.i18nc("@label", "Move to top");
visible: {
if (printJob && printJob.state == "queued" && !isAssigned(printJob)) {
if (printJob && (printJob.state == "queued" || printJob.state == "error") && !isAssigned(printJob)) {
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
}
@ -72,7 +72,7 @@ Item
if (!printJob) {
return false;
}
var states = ["queued", "sent_to_printer"];
var states = ["queued", "error", "sent_to_printer"];
return states.indexOf(printJob.state) !== -1;
}
}

View File

@ -222,7 +222,7 @@ Item
if (!printJob) {
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(printJob.state) !== -1
}
}

View File

@ -179,7 +179,7 @@ Item
if (!printer || !printer.activePrintJob) {
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
}
}