mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:19:05 +08:00
Display "move to top" button in monitor page
CURA-9940
This commit is contained in:
parent
3f699a35f4
commit
ca290a32fb
@ -23,7 +23,7 @@ Item
|
|||||||
//So compute here the visibility of the menu items, so that we can use it for the visibility of the button.
|
//So compute here the visibility of the menu items, so that we can use it for the visibility of the button.
|
||||||
property bool sendToTopVisible:
|
property bool sendToTopVisible:
|
||||||
{
|
{
|
||||||
if (printJob && printJob.state in ("queued", "error") && !isAssigned(printJob)) {
|
if (printJob && (printJob.state == "queued" || printJob.state == "error")) {
|
||||||
if (OutputDevice && OutputDevice.queuedPrintJobs[0] && OutputDevice.canWriteOthersPrintJobs) {
|
if (OutputDevice && OutputDevice.queuedPrintJobs[0] && OutputDevice.canWriteOthersPrintJobs) {
|
||||||
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
||||||
}
|
}
|
||||||
@ -246,10 +246,4 @@ Item
|
|||||||
function close() {
|
function close() {
|
||||||
popUp.close()
|
popUp.close()
|
||||||
}
|
}
|
||||||
function isAssigned(job) {
|
|
||||||
if (!job) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return job.assignedPrinter ? true : false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user