Browse Source

SettingFunction evaluation needs a stack to provide values

Note that this is still not correct. When the value gets evaluated, we
need to evaluate it with that container in the stack(s), but this case,
the stack may have other containers, so the evaluation can give
incorrect values because its context is simply not correct. This change
only prevents it from breaking because it's missing a provider.
Lipu Fei 6 years ago
parent
commit
ab572e9de2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Machines/Models/QualityProfilesDropDownMenuModel.py

+ 1 - 1
cura/Machines/Models/QualityProfilesDropDownMenuModel.py

@@ -108,6 +108,6 @@ class QualityProfilesDropDownMenuModel(ListModel):
                 layer_height = container.getProperty("layer_height", "value")
 
         if isinstance(layer_height, SettingFunction):
-            layer_height = layer_height()
+            layer_height = layer_height(global_stack)
 
         return float(layer_height)