mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Don't crash if layer height is a formula
We obtain the layer height here but that might be a formula so we should evaluate that formula here. Fixes #4005.
This commit is contained in:
parent
1136033f97
commit
6df029971d
1 changed files with 5 additions and 1 deletions
|
@ -6,10 +6,10 @@ from PyQt5.QtCore import Qt
|
|||
from UM.Application import Application
|
||||
from UM.Logger import Logger
|
||||
from UM.Qt.ListModel import ListModel
|
||||
from UM.Settings.SettingFunction import SettingFunction
|
||||
|
||||
from cura.Machines.QualityManager import QualityGroup
|
||||
|
||||
|
||||
#
|
||||
# QML Model for all built-in quality profiles. This model is used for the drop-down quality menu.
|
||||
#
|
||||
|
@ -106,4 +106,8 @@ class QualityProfilesDropDownMenuModel(ListModel):
|
|||
container = global_stack.definition
|
||||
if container and container.hasProperty("layer_height", "value"):
|
||||
layer_height = container.getProperty("layer_height", "value")
|
||||
|
||||
if isinstance(layer_height, SettingFunction):
|
||||
layer_height = layer_height()
|
||||
|
||||
return float(layer_height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue