mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Fix getActiveExtruderStacks()
CURA-5719 The dict values can be a random list. We need to fetch the first N extruders starting from position 0.
This commit is contained in:
parent
f9585b5fae
commit
b27e5a1f77
@ -311,11 +311,11 @@ class ExtruderManager(QObject):
|
||||
if not global_stack:
|
||||
return []
|
||||
|
||||
result = list(global_stack.extruders.values())
|
||||
result_tuple_list = sorted(list(global_stack.extruders.items()), key = lambda x: int(x[0]))
|
||||
result_list = [item[1] for item in result_tuple_list]
|
||||
|
||||
machine_extruder_count = global_stack.getProperty("machine_extruder_count", "value")
|
||||
|
||||
return result[:machine_extruder_count]
|
||||
return result_list[:machine_extruder_count]
|
||||
|
||||
def _globalContainerStackChanged(self) -> None:
|
||||
# If the global container changed, the machine changed and might have extruders that were not registered yet
|
||||
|
Loading…
x
Reference in New Issue
Block a user