Bind default pre-heat temperature to current build plate temperature

Currently the setting 'resets' when you go out of the print monitor mode. That wasn't the original intention but it works kind of nicely. We'll bring it up in a meeting whether this needs to be changed.

Contributes to issue CURA-3161.
This commit is contained in:
Ghostkeeper 2017-02-06 15:44:40 +01:00
parent 78fed0531d
commit b1a8b28e87
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -236,12 +236,12 @@ Column
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "60" //TODO: Bind this to the default. Binding
/*Binding
{ {
target: preheatTemperatureInput target: preheatTemperatureInput
property: "text" property: "text"
value: { value:
{
// Stacklevels // Stacklevels
// 0: user -> unsaved change // 0: user -> unsaved change
// 1: quality changes -> saved change // 1: quality changes -> saved change
@ -250,17 +250,20 @@ Column
// 4: variant // 4: variant
// 5: machine_changes // 5: machine_changes
// 6: machine // 6: machine
if ((base.resolve != "None" && base.resolve) && (stackLevel != 0) && (stackLevel != 1)) { if ((bedTemperature.resolve != "None" && bedTemperature.resolve) && (bedTemperature.stackLevels[0] != 0) && (bedTemperature.stackLevels[0] != 1))
{
// We have a resolve function. Indicates that the setting is not settable per extruder and that // We have a resolve function. Indicates that the setting is not settable per extruder and that
// we have to choose between the resolved value (default) and the global value // we have to choose between the resolved value (default) and the global value
// (if user has explicitly set this). // (if user has explicitly set this).
return base.resolve; return bedTemperature.resolve;
} else { }
return propertyProvider.properties.value; else
{
return bedTemperature.properties.value;
} }
} }
when: !preheatTemperatureInput.activeFocus when: !preheatTemperatureInput.activeFocus
}*/ }
} }
} }
} }
@ -270,8 +273,10 @@ Column
id: bedTemperature id: bedTemperature
containerStackId: Cura.MachineManager.activeMachineId containerStackId: Cura.MachineManager.activeMachineId
key: "material_bed_temperature" key: "material_bed_temperature"
watchedProperties: ["value", "minimum_value", "maximum_value", "minimum_value_warning", "maximum_value_warning"] watchedProperties: ["value", "minimum_value", "maximum_value", "minimum_value_warning", "maximum_value_warning", "resolve"]
storeIndex: 0 storeIndex: 0
property var resolve: Cura.MachineManager.activeStackId != Cura.MachineManager.activeMachineId ? properties.resolve : "None"
} }
Loader Loader