diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3275055951..de36f43fc3 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1230,7 +1230,6 @@ class CuraApplication(QtApplication): def slice(self): Logger.log("d", "Slice...") backend = self.getBackend() - # backend.enableSlicing() backend.forceSlice() @pyqtSlot() diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 6f9eb4cb07..e3a00b766b 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -103,6 +103,16 @@ Item { } } + Connections { + target: UM.Preferences + onPreferenceChanged: + { + var autoSlice = UM.Preferences.getValue("general/auto_slice"); + prepareButton.autoSlice = autoSlice; + saveToButton.autoSlice = autoSlice; + } + } + // Prepare button, only shows if auto_slice is off Button { id: prepareButton @@ -111,11 +121,9 @@ Item { //enabled: (base.backendState == 3 || base.backendState == 5) && base.activity == true enabled: (base.backendState == 1 || base.backendState == 2) && base.activity == true visible: { - CuraApplication.log("pref: " + UM.Preferences.getValue("general/auto_slice")); - CuraApplication.log("backend state: " + base.backendState); - CuraApplication.log("activity: " + base.activity); - return !UM.Preferences.getValue("general/auto_slice") && (base.backendState == 1 || base.backendState == 2) && base.activity == true + return !autoSlice && (base.backendState == 1 || base.backendState == 2) && base.activity == true; } + property bool autoSlice height: UM.Theme.getSize("save_button_save_to_button").height anchors.top: parent.top @@ -192,7 +200,10 @@ Item { tooltip: UM.OutputDeviceManager.activeDeviceDescription; enabled: (base.backendState == 3 || base.backendState == 5) && base.activity == true - visible: UM.Preferences.getValue("general/auto_slice") || ((base.backendState == 3 || base.backendState == 5) && base.activity == true) + visible: { + return autoSlice || ((base.backendState == 3 || base.backendState == 5) && base.activity == true); + } + property bool autoSlice height: UM.Theme.getSize("save_button_save_to_button").height anchors.top: parent.top