Create extruder stack for single extruder machines on start - CURA-4482

This commit is contained in:
ChrisTerBeke 2017-10-31 09:08:20 +01:00
parent b91824aab1
commit d718e6e36c
20 changed files with 268 additions and 224 deletions

View file

@ -201,7 +201,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
continue
default_color = self.defaultColors[position] if 0 <= position < len(self.defaultColors) else self.defaultColors[0]
color = extruder.material.getMetaDataEntry("color_code", default = default_color) if material else default_color
color = extruder.material.getMetaDataEntry("color_code", default = default_color) if extruder.material else default_color
# construct an item with only the relevant information
item = {
@ -210,7 +210,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
"color": color,
"index": position,
"definition": extruder.getBottom().getId(),
"material": extruder.material.getName() if material else "",
"material": extruder.material.getName() if extruder.material else "",
"variant": extruder.variant.getName() if extruder.variant else "", # e.g. print core
}