Fix adhesion checkbox in recommended mode

CURA-6182

Move complex logic to Python.
This commit is contained in:
Lipu Fei 2019-05-21 08:09:53 +02:00
parent 0dc49a66f1
commit 80827bdf70
3 changed files with 54 additions and 13 deletions

View file

@ -18,6 +18,7 @@ Item
height: childrenRect.height
property real labelColumnWidth: Math.round(width / 3)
property var curaRecommendedMode: Cura.RecommendedMode {}
Cura.IconWithText
{
@ -64,19 +65,7 @@ Item
onClicked:
{
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.resolve;
if(adhesionType === "skirt" || adhesionType === "none")
{
// If the rest of the stack doesn't prescribe an adhesion-type, default to a brim
adhesionType = "brim";
}
}
platformAdhesionType.setPropertyValue("value", adhesionType);
curaRecommendedMode.setAdhesion(!parent.checked)
}
onEntered: