mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 01:04:35 +08:00
Fix variant selection dropdown in sidebar so it actually selects a variant
This commit is contained in:
parent
0f54e1e712
commit
fd4943b18a
@ -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{
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user