mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Fix QML undefined errors
This commit is contained in:
parent
ac8a7d4aeb
commit
86ff7443cf
2 changed files with 21 additions and 5 deletions
|
|
@ -29,10 +29,14 @@ Menu
|
|||
checkable: true
|
||||
checked: {
|
||||
var extruder = Cura.MachineManager.activeMachine.extruderList[extruderIndex]
|
||||
return extruder.variant.name == model.hotend_name
|
||||
return (extruder === undefined) ? false : (extruder.variant.name == model.hotend_name)
|
||||
}
|
||||
exclusiveGroup: group
|
||||
enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled
|
||||
enabled:
|
||||
{
|
||||
var extruder = Cura.MachineManager.activeMachine.extruderList[extruderIndex]
|
||||
return (extruder === undefined) ? false : extruder.isEnabled
|
||||
}
|
||||
onTriggered: {
|
||||
Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue