Add newlines before properties

As suggested in the code review.

Contributes to issue CURA-9220.

Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
This commit is contained in:
Ghostkeeper 2022-08-01 10:47:57 +02:00 committed by GitHub
parent 37a98cbb6f
commit 7c1a254812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,13 +23,14 @@ Item
//So compute here the visibility of the menu items, so that we can use it for the visibility of the button.
property bool sendToTopVisible:
{
if (printJob && (printJob.state == "queued" || printJob.state == "error") && !isAssigned(printJob)) {
if (printJob && printJob.state in ("queued", "error") && !isAssigned(printJob)) {
if (OutputDevice && OutputDevice.queuedPrintJobs[0] && OutputDevice.canWriteOthersPrintJobs) {
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
}
}
return false;
}
property bool deleteVisible:
{
if(!printJob)
@ -53,6 +54,7 @@ Item
var states = ["queued", "error", "sent_to_printer"];
return states.indexOf(printJob.state) !== -1;
}
property bool pauseVisible:
{
if(!printJob)
@ -99,6 +101,7 @@ Item
var states = ["pre_print", "printing", "pausing", "paused", "resuming"];
return states.indexOf(printJob.state) !== -1;
}
property bool hasItems: sendToTopVisible || deleteVisible || pauseVisible || abortVisible
GenericPopUp