mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-03 07:41:18 -07:00
Code style improvements
Contributes to CURA-5551
This commit is contained in:
parent
5854ae544f
commit
2790650686
1 changed files with 4 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sliceOrStopSlicing() {
|
function sliceOrStopSlicing() {
|
||||||
if ( [ 1, 5 ].indexOf( base.backendState ) != -1 )
|
if ([1, 5].indexOf(base.backendState) != -1)
|
||||||
{
|
{
|
||||||
prepareButton.preparingToSlice = true;
|
prepareButton.preparingToSlice = true;
|
||||||
CuraApplication.backend.forceSlice();
|
CuraApplication.backend.forceSlice();
|
||||||
|
|
@ -182,13 +182,13 @@ Item {
|
||||||
|
|
||||||
// 1 = not started, 4 = error, 5 = disabled
|
// 1 = not started, 4 = error, 5 = disabled
|
||||||
text: {
|
text: {
|
||||||
if ( preparingToSlice )
|
if (preparingToSlice)
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label:Printjob", "Preparing");
|
return catalog.i18nc("@label:Printjob", "Preparing");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( [ 1, 4, 5 ].indexOf( base.backendState ) != -1 )
|
if ([1, 4, 5].indexOf(base.backendState) != -1)
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label:Printjob", "Prepare");
|
return catalog.i18nc("@label:Printjob", "Prepare");
|
||||||
}
|
}
|
||||||
|
|
@ -259,11 +259,10 @@ Item {
|
||||||
target: UM.Backend
|
target: UM.Backend
|
||||||
onStateChanged:
|
onStateChanged:
|
||||||
{
|
{
|
||||||
if ( [ 2, 3 ].indexOf( UM.Backend.state) != -1 )
|
if ([2, 3].indexOf(UM.Backend.state) != -1)
|
||||||
{
|
{
|
||||||
prepareButton.preparingToSlice = false;
|
prepareButton.preparingToSlice = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue