mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix getting name and colour from extruder
There used to be an extruder object from which we could ask these properties. But now we have a container stack in its place, so we need to get the properties in a slightly different way. Contributes to issues CURA-1278 and CURA-340.
This commit is contained in:
parent
af484b03d8
commit
4aa495f9ef
1 changed files with 2 additions and 2 deletions
|
@ -53,8 +53,8 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
|||
return #There is no machine to get the extruders of.
|
||||
for index, extruder in manager.getMachineExtruders(global_container_stack.getBottom()):
|
||||
item = { #Construct an item with only the relevant information.
|
||||
"name": extruder.name,
|
||||
"colour": extruder.material.getMetaDataEntry("color_code", default = "#FFFF00"),
|
||||
"name": extruder.getName(),
|
||||
"colour": extruder.findContainer(type = "material").getMetaDataEntry("color_code", default = "#FFFF00"),
|
||||
"index": index
|
||||
}
|
||||
self.appendItem(item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue