mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -06:00
Simplify if notation
CURA-9278
This commit is contained in:
parent
0f36f83373
commit
e3fc73f17d
1 changed files with 5 additions and 3 deletions
|
@ -47,11 +47,13 @@ class CompatibleMachineModel(ListModel):
|
||||||
compatible_type = machine_manager.activeMachine.extruderList[extruder.getPosition()].material.getMetaDataEntry("material", "")
|
compatible_type = machine_manager.activeMachine.extruderList[extruder.getPosition()].material.getMetaDataEntry("material", "")
|
||||||
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 = [] if not has_compatible_material else [{
|
materials = []
|
||||||
|
if has_compatible_material:
|
||||||
|
materials.append({
|
||||||
"brand": extruder.activeMaterial.brand,
|
"brand": extruder.activeMaterial.brand,
|
||||||
"name": extruder.activeMaterial.name,
|
"name": extruder.activeMaterial.name,
|
||||||
"hexcolor": extruder.activeMaterial.color
|
"hexcolor": extruder.activeMaterial.color,
|
||||||
}]
|
})
|
||||||
extruder_configs[extruder.getPosition()] = {
|
extruder_configs[extruder.getPosition()] = {
|
||||||
"position": extruder.getPosition(),
|
"position": extruder.getPosition(),
|
||||||
"core": extruder.hotendID,
|
"core": extruder.hotendID,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue