mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
WIP: Refactor BuildPlateModel and split MultiBuildPlateModel
This commit is contained in:
parent
1c8f63e47f
commit
495fc8bbd7
27 changed files with 172 additions and 111 deletions
|
|
@ -14,26 +14,18 @@ Menu
|
|||
|
||||
Instantiator
|
||||
{
|
||||
id: buildplateInstantiator
|
||||
model: UM.InstanceContainersModel
|
||||
{
|
||||
filter:
|
||||
{
|
||||
"type": "variant",
|
||||
"hardware_type": "buildplate",
|
||||
"definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine
|
||||
}
|
||||
}
|
||||
model: Cura.BuildPlateModel
|
||||
|
||||
MenuItem {
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.globalVariantId
|
||||
checked: model.name == Cura.MachineManager.globalVariantName // TODO
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
Cura.MachineManager.setActiveVariantBuildplate(model.id);
|
||||
onTriggered: {
|
||||
Cura.MachineManager.setGlobalVariant(model.container_node); // TODO
|
||||
}
|
||||
}
|
||||
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(object)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue