WIP: Fix NozzleMenu warning on non-notifiable bindings

This commit is contained in:
Lipu Fei 2018-02-15 15:06:15 +01:00
parent 1e0a078af8
commit 4468f4d620
2 changed files with 17 additions and 2 deletions

View file

@ -19,6 +19,16 @@ Menu
id: nozzleModel
}
property var extruderStack: Cura.MachineManager.getExtruder(extruderIndex)
Connections
{
target: Cura.MachineManager
onGlobalContainerChanged: {
menu.extruderStack = Cura.MachineManager.getExtruder(extruderIndex)
}
}
Instantiator
{
model: nozzleModel
@ -27,7 +37,7 @@ Menu
{
text: model.hotend_name
checkable: true
checked: Cura.MachineManager.activeMachine.extruders[extruderIndex].variant.name == model.hotend_name
checked: extruderStack.variant.name == model.hotend_name
exclusiveGroup: group
onTriggered: {
Cura.MachineManager.setVariantGroup(extruderIndex, model.container_node);