mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Turn slice automatically off now correctly visualizes Prepare button. CURA-3214
This commit is contained in:
parent
db984561e9
commit
59a8c21c73
2 changed files with 16 additions and 6 deletions
|
@ -1230,7 +1230,6 @@ class CuraApplication(QtApplication):
|
|||
def slice(self):
|
||||
Logger.log("d", "Slice...")
|
||||
backend = self.getBackend()
|
||||
# backend.enableSlicing()
|
||||
backend.forceSlice()
|
||||
|
||||
@pyqtSlot()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue