mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Fix favorite not being checked properly in MaterialMenu
CURA-6804
This commit is contained in:
parent
71a22bf194
commit
a4ed51342c
1 changed files with 9 additions and 4 deletions
|
|
@ -14,8 +14,7 @@ Menu
|
|||
|
||||
property int extruderIndex: 0
|
||||
property string currentRootMaterialId: Cura.MachineManager.currentRootMaterialId[extruderIndex]
|
||||
|
||||
property string activeMaterialId: Cura.MachineManager.activeMachine.extruders[extruderIndex].material.id
|
||||
property string activeMaterialId: Cura.MachineManager.activeMachine.extruderList[extruderIndex].material.id
|
||||
property bool updateModels: true
|
||||
Cura.FavoriteMaterialsModel
|
||||
{
|
||||
|
|
@ -53,7 +52,7 @@ Menu
|
|||
checkable: true
|
||||
checked: model.root_material_id === menu.currentRootMaterialId
|
||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||
exclusiveGroup: group
|
||||
exclusiveGroup: favoriteGroup // One favorite and one item from the others can be active at the same time.
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(index)
|
||||
|
|
@ -127,10 +126,16 @@ Menu
|
|||
onObjectRemoved: menu.removeItem(object)
|
||||
}
|
||||
|
||||
ExclusiveGroup {
|
||||
ExclusiveGroup
|
||||
{
|
||||
id: group
|
||||
}
|
||||
|
||||
ExclusiveGroup
|
||||
{
|
||||
id: favoriteGroup
|
||||
}
|
||||
|
||||
MenuSeparator {}
|
||||
|
||||
MenuItem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue