mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-18 02:25:54 +08:00
Don't show the context menu for printed jobs (only active ones and queued ones)
Contributes to CL-1118
This commit is contained in:
parent
1680548a39
commit
0273cd2a0e
@ -33,6 +33,7 @@ Item {
|
|||||||
hoverEnabled: true;
|
hoverEnabled: true;
|
||||||
onClicked: parent.switchPopupState();
|
onClicked: parent.switchPopupState();
|
||||||
text: "\u22EE"; //Unicode; Three stacked points.
|
text: "\u22EE"; //Unicode; Three stacked points.
|
||||||
|
visible: printJob.state == "queued" || running ? true : false;
|
||||||
width: 35 * screenScaleFactor; // TODO: Theme!
|
width: 35 * screenScaleFactor; // TODO: Theme!
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ Item {
|
|||||||
|
|
||||||
PrintJobContextMenuItem {
|
PrintJobContextMenuItem {
|
||||||
enabled: {
|
enabled: {
|
||||||
if (printJob && !running) {
|
if (printJob && printJob.state == "queued") {
|
||||||
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
||||||
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
||||||
}
|
}
|
||||||
@ -116,7 +117,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PrintJobContextMenuItem {
|
PrintJobContextMenuItem {
|
||||||
enabled: printJob && !running;
|
enabled: printJob && printJob.state == "queued";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
deleteConfirmationDialog.visible = true;
|
deleteConfirmationDialog.visible = true;
|
||||||
popup.close();
|
popup.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user