mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06: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
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue