|
@@ -14,7 +14,7 @@ Item {
|
|
|
|
|
|
property real progress: UM.Backend.progress
|
|
|
property int backendState: UM.Backend.state
|
|
|
- property var backend: CuraApplication.getBackend()
|
|
|
+ property var backend: CuraApplication.getBackend() || "undefined"
|
|
|
property bool activity: CuraApplication.platformActivity
|
|
|
|
|
|
property alias buttonRowWidth: saveRow.width
|
|
@@ -49,12 +49,16 @@ Item {
|
|
|
}
|
|
|
|
|
|
function sliceOrStopSlicing() {
|
|
|
- if (base.backendState != "undefined" && backend !== "undefined") {
|
|
|
- if ([1, 5].indexOf(base.backendState) != -1) {
|
|
|
- backend.forceSlice();
|
|
|
- } else {
|
|
|
- backend.stopSlicing();
|
|
|
+ try {
|
|
|
+ if (base.backendState != "undefined" && base.backend != "undefined") {
|
|
|
+ if ([1, 5].indexOf(base.backendState) != -1) {
|
|
|
+ backend.forceSlice();
|
|
|
+ } else {
|
|
|
+ backend.stopSlicing();
|
|
|
+ }
|
|
|
}
|
|
|
+ } catch (e) {
|
|
|
+ console.log('Could not start or stop slicing', e)
|
|
|
}
|
|
|
}
|
|
|
|