Made backend available in qml, calling forceSlice and stopSlicing directly. CURA-3214

This commit is contained in:
Jack Ha 2017-02-16 10:56:01 +01:00
parent 59a8c21c73
commit 464bf73f85
3 changed files with 21 additions and 13 deletions

View file

@ -133,12 +133,11 @@ Item {
text: [1, 5].indexOf(UM.Backend.state) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
onClicked:
{
var backend = CuraApplication.getBackend()
if ([1, 5].indexOf(UM.Backend.state) != -1) {
CuraApplication.log("Prepare....");
CuraApplication.slice();
backend.forceSlice();
} else {
CuraApplication.log("Cancel....");
CuraApplication.sliceStop();
backend.stopSlicing();
}
}