mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:05:52 +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
|
Instantiator
|
||||||
{
|
{
|
||||||
// model: UM.MachineVariantsModel { }
|
model: UM.InstanceContainersModel
|
||||||
|
{
|
||||||
|
filter:
|
||||||
|
{
|
||||||
|
"type": "variant",
|
||||||
|
"definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine
|
||||||
|
}
|
||||||
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: model.name;
|
text: model.name;
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.active;
|
checked: model.active;
|
||||||
exclusiveGroup: machineVariantsGroup;
|
exclusiveGroup: machineVariantsGroup;
|
||||||
onTriggered: UM.MachineManager.setActiveMachineVariant(model.name)
|
onTriggered: Cura.MachineManager.setActiveVariant(model.id)
|
||||||
}
|
}
|
||||||
onObjectAdded: machineMenu.insertItem(index, object)
|
onObjectAdded: machineMenu.insertItem(index, object)
|
||||||
onObjectRemoved: machineMenu.removeItem(object)
|
onObjectRemoved: machineMenu.removeItem(object)
|
||||||
@ -207,7 +214,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
ExclusiveGroup { id: machineVariantsGroup; }
|
ExclusiveGroup { id: machineVariantsGroup; }
|
||||||
|
|
||||||
// MenuSeparator { visible: UM.MachineManager.hasVariants; }
|
MenuSeparator { visible: Cura.MachineManager.hasVariants; }
|
||||||
|
|
||||||
MenuItem { action: Actions.addMachine; }
|
MenuItem { action: Actions.addMachine; }
|
||||||
MenuItem { action: Actions.configureMachines; }
|
MenuItem { action: Actions.configureMachines; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user