mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 07:19:00 +08:00
Machine variants can now be selected from dropdown menu
CURA-1278
This commit is contained in:
parent
6ffde62bcf
commit
5dbe0bdc03
@ -193,13 +193,20 @@ UM.MainWindow
|
||||
|
||||
Instantiator
|
||||
{
|
||||
// model: UM.MachineVariantsModel { }
|
||||
model: UM.InstanceContainersModel
|
||||
{
|
||||
filter:
|
||||
{
|
||||
"type": "variant",
|
||||
"definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: model.name;
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
exclusiveGroup: machineVariantsGroup;
|
||||
onTriggered: UM.MachineManager.setActiveMachineVariant(model.name)
|
||||
onTriggered: Cura.MachineManager.setActiveVariant(model.id)
|
||||
}
|
||||
onObjectAdded: machineMenu.insertItem(index, object)
|
||||
onObjectRemoved: machineMenu.removeItem(object)
|
||||
@ -207,7 +214,7 @@ UM.MainWindow
|
||||
|
||||
ExclusiveGroup { id: machineVariantsGroup; }
|
||||
|
||||
// MenuSeparator { visible: UM.MachineManager.hasVariants; }
|
||||
MenuSeparator { visible: Cura.MachineManager.hasVariants; }
|
||||
|
||||
MenuItem { action: Actions.addMachine; }
|
||||
MenuItem { action: Actions.configureMachines; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user