mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:19:02 +08:00
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:
parent
37a98cbb6f
commit
7c1a254812
@ -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.
|
//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 == "queued" || printJob.state == "error") && !isAssigned(printJob)) {
|
if (printJob && printJob.state in ("queued", "error") && !isAssigned(printJob)) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool deleteVisible:
|
property bool deleteVisible:
|
||||||
{
|
{
|
||||||
if(!printJob)
|
if(!printJob)
|
||||||
@ -53,6 +54,7 @@ Item
|
|||||||
var states = ["queued", "error", "sent_to_printer"];
|
var states = ["queued", "error", "sent_to_printer"];
|
||||||
return states.indexOf(printJob.state) !== -1;
|
return states.indexOf(printJob.state) !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool pauseVisible:
|
property bool pauseVisible:
|
||||||
{
|
{
|
||||||
if(!printJob)
|
if(!printJob)
|
||||||
@ -99,6 +101,7 @@ Item
|
|||||||
var states = ["pre_print", "printing", "pausing", "paused", "resuming"];
|
var states = ["pre_print", "printing", "pausing", "paused", "resuming"];
|
||||||
return states.indexOf(printJob.state) !== -1;
|
return states.indexOf(printJob.state) !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool hasItems: sendToTopVisible || deleteVisible || pauseVisible || abortVisible
|
property bool hasItems: sendToTopVisible || deleteVisible || pauseVisible || abortVisible
|
||||||
|
|
||||||
GenericPopUp
|
GenericPopUp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user