Don't show the context menu for printed jobs (only active ones and queued ones)

Contributes to CL-1118
This commit is contained in:
Ian Paschal 2018-10-30 13:44:24 +01:00
parent 1680548a39
commit 0273cd2a0e

View file

@ -33,6 +33,7 @@ Item {
hoverEnabled: true;
onClicked: parent.switchPopupState();
text: "\u22EE"; //Unicode; Three stacked points.
visible: printJob.state == "queued" || running ? true : false;
width: 35 * screenScaleFactor; // TODO: Theme!
}
@ -101,7 +102,7 @@ Item {
PrintJobContextMenuItem {
enabled: {
if (printJob && !running) {
if (printJob && printJob.state == "queued") {
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
}
@ -116,7 +117,7 @@ Item {
}
PrintJobContextMenuItem {
enabled: printJob && !running;
enabled: printJob && printJob.state == "queued";
onClicked: {
deleteConfirmationDialog.visible = true;
popup.close();