Browse Source

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.
Ghostkeeper 5 years ago
parent
commit
0352553193

+ 6 - 6
resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml

@@ -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
     }
 }