mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Display "move to top" button in monitor page
CURA-9940
This commit is contained in:
parent
3f699a35f4
commit
ca290a32fb
1 changed files with 1 additions and 7 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue