mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Do not show "move to top" on print jobs waiting for configuration change
Contributes to CL-1118
This commit is contained in:
parent
843cb9e09c
commit
ac7a566ae1
1 changed files with 8 additions and 2 deletions
|
@ -12,6 +12,7 @@ Item {
|
||||||
id: root;
|
id: root;
|
||||||
property var printJob: null;
|
property var printJob: null;
|
||||||
property var running: isRunning(printJob);
|
property var running: isRunning(printJob);
|
||||||
|
property var assigned: isAssigned(printJob);
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: button;
|
id: button;
|
||||||
|
@ -102,7 +103,7 @@ Item {
|
||||||
|
|
||||||
PrintJobContextMenuItem {
|
PrintJobContextMenuItem {
|
||||||
enabled: {
|
enabled: {
|
||||||
if (printJob && printJob.state == "queued") {
|
if (printJob && printJob.state == "queued" && !assigned) {
|
||||||
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
||||||
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +118,6 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintJobContextMenuItem {
|
PrintJobContextMenuItem {
|
||||||
enabled: printJob && printJob.state == "queued";
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
deleteConfirmationDialog.visible = true;
|
deleteConfirmationDialog.visible = true;
|
||||||
popup.close();
|
popup.close();
|
||||||
|
@ -210,4 +210,10 @@ Item {
|
||||||
}
|
}
|
||||||
return ["paused", "printing", "pre_print"].indexOf(job.state) !== -1;
|
return ["paused", "printing", "pre_print"].indexOf(job.state) !== -1;
|
||||||
}
|
}
|
||||||
|
function isAssigned(job) {
|
||||||
|
if (!job) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return job.assignedPrinter ? true : false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue