Move setting error checking to StartSliceJob and allow the job to return a proper response

Now the job can determine if we can continue with slicing or not and if
not, why not.

This also means we can now show a message when we cannot find any
slicable objects.

Contributes to CURA-1278
This commit is contained in:
Arjen Hiemstra 2016-05-30 13:03:06 +02:00
parent cd2b853fff
commit 8039184c18
3 changed files with 56 additions and 38 deletions

View file

@ -21,16 +21,14 @@ Rectangle {
property string fileBaseName
property string statusText:
{
if(!activity)
{
return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model");
}
if(base.backendState == 1)
{
if(!activity)
{
return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model");
}
else
{
return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice...");
}
return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice...");
}
else if(base.backendState == 2)
{
@ -42,7 +40,7 @@ Rectangle {
}
else if(base.backendState == 4)
{
return catalog.i18nc("@label:PrintjobStatus", "Unable to slice due to errors")
return catalog.i18nc("@label:PrintjobStatus", "Unable to Slice")
}
}