Fix variant selection dropdown in sidebar so it actually selects a variant

This commit is contained in:
Arjen Hiemstra 2015-12-04 16:45:21 +01:00
parent 0f54e1e712
commit fd4943b18a

View File

@ -48,14 +48,14 @@ Item{
id: variantsSelectionMenu
Instantiator
{
model: UM.MachineVariantsModel { }
model: UM.MachineVariantsModel { id: variantsModel }
MenuItem
{
text: model.name;
checkable: true;
checked: model.active;
exclusiveGroup: variantSelectionMenuGroup;
onTriggered: UM.MachineManager.setActiveMachineVariant(model.getItem(index).name)
onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name)
}
onObjectAdded: variantsSelectionMenu.insertItem(index, object)
onObjectRemoved: variantsSelectionMenu.removeItem(object)
@ -148,4 +148,4 @@ Item{
// }
}
}
}
}