mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Fix bug in displaying extruders
CURA-9278
This commit is contained in:
parent
8d9e9a9dbf
commit
99136fd209
1 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ class CompatibleMachineModel(ListModel):
|
||||||
has_compatible_material = extruder.activeMaterial and compatible_type in [extruder.activeMaterial.type, None, "None", "", "empty"]
|
has_compatible_material = extruder.activeMaterial and compatible_type in [extruder.activeMaterial.type, None, "None", "", "empty"]
|
||||||
|
|
||||||
materials = []
|
materials = []
|
||||||
if has_compatible_material:
|
if has_compatible_material:
|
||||||
materials.append({
|
materials.append({
|
||||||
"brand": extruder.activeMaterial.brand,
|
"brand": extruder.activeMaterial.brand,
|
||||||
"name": extruder.activeMaterial.name,
|
"name": extruder.activeMaterial.name,
|
||||||
|
@ -77,9 +77,9 @@ class CompatibleMachineModel(ListModel):
|
||||||
"hexcolor": extruder.material.color
|
"hexcolor": extruder.material.color
|
||||||
})
|
})
|
||||||
|
|
||||||
if all([len(extruder["materials"]) > 0 for extruder in extruder_configs.values()]):
|
if any([len(extruder["materials"]) > 0 for extruder in extruder_configs.values()]):
|
||||||
self.appendItem({
|
self.appendItem({
|
||||||
"name": printer.name,
|
"name": printer.name,
|
||||||
"unique_id": printer.name, # <- Can assume the cloud doesn't have duplicate names?
|
"unique_id": printer.name, # <- Can assume the cloud doesn't have duplicate names?
|
||||||
"extruders": extruder_configs.values()
|
"extruders": list(extruder_configs.values())
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue