From 876ad0159731ad0e347293fba85198534766ced4 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Fri, 15 Dec 2017 13:32:45 +0100 Subject: [PATCH] Directly use CuraApplication.backend instead of via property --- resources/qml/SaveButton.qml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 2b938c1745..c5025dea78 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -14,7 +14,6 @@ Item { property real progress: UM.Backend.progress property int backendState: UM.Backend.state - property var backend: CuraApplication.backend property bool activity: CuraApplication.platformActivity property alias buttonRowWidth: saveRow.width @@ -50,12 +49,10 @@ Item { function sliceOrStopSlicing() { try { - if (base.backendState != "undefined" && base.backend != "undefined") { - if ([1, 5].indexOf(base.backendState) != -1) { - backend.forceSlice(); - } else { - backend.stopSlicing(); - } + if ([1, 5].indexOf(base.backendState) != -1) { + CuraApplication.backend.forceSlice(); + } else { + CuraApplication.backend.stopSlicing(); } } catch (e) { console.log('Could not start or stop slicing', e)