mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +08:00
Enumerate again over the machine's extruders
We needed to get the index, after all. Contributes to issues CURA-340 and CURA-1278.
This commit is contained in:
parent
21545af5c8
commit
8c7b3a05b6
@ -51,7 +51,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||
global_container_stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||
if not global_container_stack:
|
||||
return #There is no machine to get the extruders of.
|
||||
for index, extruder in manager.getMachineExtruders(global_container_stack.getBottom()):
|
||||
for index, extruder in enumerate(manager.getMachineExtruders(global_container_stack.getBottom())):
|
||||
material = extruder.findContainer(type = "material")
|
||||
colour = material.getMetaDataEntry("color_code", default = "#FFFF00") if material else "#FFFF00"
|
||||
item = { #Construct an item with only the relevant information.
|
||||
|
Loading…
x
Reference in New Issue
Block a user