mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 17:24:21 +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
|
id: variantsSelectionMenu
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: UM.MachineVariantsModel { }
|
model: UM.MachineVariantsModel { id: variantsModel }
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: model.name;
|
text: model.name;
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.active;
|
checked: model.active;
|
||||||
exclusiveGroup: variantSelectionMenuGroup;
|
exclusiveGroup: variantSelectionMenuGroup;
|
||||||
onTriggered: UM.MachineManager.setActiveMachineVariant(model.getItem(index).name)
|
onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name)
|
||||||
}
|
}
|
||||||
onObjectAdded: variantsSelectionMenu.insertItem(index, object)
|
onObjectAdded: variantsSelectionMenu.insertItem(index, object)
|
||||||
onObjectRemoved: variantsSelectionMenu.removeItem(object)
|
onObjectRemoved: variantsSelectionMenu.removeItem(object)
|
||||||
@ -148,4 +148,4 @@ Item{
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user