mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Remove an if-else block that assumes no ExtruderStack
There is always an ExtruderStack, so the else-block will never be executed.
This commit is contained in:
parent
3c8368827b
commit
b1198ee1b8
1 changed files with 3 additions and 7 deletions
|
@ -40,13 +40,9 @@ class CustomSettingFunctions:
|
|||
global_stack = machine_manager.activeMachine
|
||||
extruder_stack = global_stack.extruders[str(extruder_position)]
|
||||
|
||||
if extruder_stack:
|
||||
value = extruder_stack.getRawProperty(property_key, "value", context = context)
|
||||
if isinstance(value, SettingFunction):
|
||||
value = value(extruder_stack, context = context)
|
||||
else:
|
||||
# Just a value from global.
|
||||
value = global_stack.getProperty(property_key, "value", context = context)
|
||||
value = extruder_stack.getRawProperty(property_key, "value", context = context)
|
||||
if isinstance(value, SettingFunction):
|
||||
value = value(extruder_stack, context = context)
|
||||
|
||||
return value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue