Do not show "move to top" on print jobs waiting for configuration change

Contributes to CL-1118
This commit is contained in:
Ian Paschal 2018-10-31 11:45:30 +01:00
parent 843cb9e09c
commit ac7a566ae1

View file

@ -12,6 +12,7 @@ Item {
id: root;
property var printJob: null;
property var running: isRunning(printJob);
property var assigned: isAssigned(printJob);
Button {
id: button;
@ -102,7 +103,7 @@ Item {
PrintJobContextMenuItem {
enabled: {
if (printJob && printJob.state == "queued") {
if (printJob && printJob.state == "queued" && !assigned) {
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
}
@ -117,7 +118,6 @@ Item {
}
PrintJobContextMenuItem {
enabled: printJob && printJob.state == "queued";
onClicked: {
deleteConfirmationDialog.visible = true;
popup.close();
@ -210,4 +210,10 @@ Item {
}
return ["paused", "printing", "pre_print"].indexOf(job.state) !== -1;
}
function isAssigned(job) {
if (!job) {
return false;
}
return job.assignedPrinter ? true : false;
}
}