mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:39:02 +08: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
@ -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…
x
Reference in New Issue
Block a user