Read resolved value for adhesion type

We still write to the value property.
We need the resolved value because we want to read from the extruder stacks which may overwrite the adhesion type in a profile.

Contributes to issue CURA-6182.
This commit is contained in:
Ghostkeeper 2019-05-16 14:23:36 +02:00
parent f3ea522811
commit 0352553193
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -64,19 +64,19 @@ Item
onClicked:
{
var adhesionType = "skirt"
var adhesionType = "skirt";
if (!parent.checked)
{
// Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft
platformAdhesionType.removeFromContainer(0)
adhesionType = platformAdhesionType.properties.value
platformAdhesionType.removeFromContainer(0);
adhesionType = platformAdhesionType.properties.resolve;
if(adhesionType === "skirt" || adhesionType === "none")
{
// If the rest of the stack doesn't prescribe an adhesion-type, default to a brim
adhesionType = "brim"
adhesionType = "brim";
}
}
platformAdhesionType.setPropertyValue("value", adhesionType)
platformAdhesionType.setPropertyValue("value", adhesionType);
}
onEntered:
@ -95,7 +95,7 @@ Item
containerStack: Cura.MachineManager.activeMachine
removeUnusedValue: false //Doesn't work with settings that are resolved.
key: "adhesion_type"
watchedProperties: [ "value", "enabled" ]
watchedProperties: [ "value", "resolve", "enabled" ]
storeIndex: 0
}
}