mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Machine variants can now be selected from dropdown menu
CURA-1278
This commit is contained in:
parent
6ffde62bcf
commit
5dbe0bdc03
1 changed files with 10 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue