mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Improve the bindings for the material menu
This way the evaluation is significantly faster.
This commit is contained in:
parent
b2df5c3445
commit
27370dd45d
1 changed files with 5 additions and 4 deletions
|
@ -13,7 +13,8 @@ Menu
|
|||
title: catalog.i18nc("@label:category menu label", "Material")
|
||||
|
||||
property int extruderIndex: 0
|
||||
|
||||
property string currentRootMaterialId: Cura.MachineManager.currentRootMaterialId[extruderIndex]
|
||||
property string activeMaterialId: Cura.MachineManager.allActiveMaterialIds[Cura.ExtruderManager.extruderIds[extruderIndex]]
|
||||
Cura.FavoriteMaterialsModel
|
||||
{
|
||||
id: favoriteMaterialsModel
|
||||
|
@ -45,7 +46,7 @@ Menu
|
|||
{
|
||||
text: model.brand + " " + model.name
|
||||
checkable: true
|
||||
checked: model.root_material_id == Cura.MachineManager.currentRootMaterialId[extruderIndex]
|
||||
checked: model.root_material_id === menu.currentRootMaterialId
|
||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||
exclusiveGroup: group
|
||||
}
|
||||
|
@ -67,7 +68,7 @@ Menu
|
|||
{
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.root_material_id == Cura.MachineManager.currentRootMaterialId[extruderIndex]
|
||||
checked: model.root_material_id === menu.currentRootMaterialId
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||
}
|
||||
|
@ -105,7 +106,7 @@ Menu
|
|||
{
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[Cura.ExtruderManager.extruderIds[extruderIndex]]
|
||||
checked: model.id === menu.activeMaterialId
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue