mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 15:25:09 -06:00
Select the next selected material when it is activated or removed.
Contributes to CURA-5682.
This commit is contained in:
parent
7e1a833e9c
commit
6dc53cc60a
1 changed files with 6 additions and 2 deletions
|
@ -84,8 +84,10 @@ Item
|
|||
{
|
||||
forceActiveFocus()
|
||||
|
||||
const extruder_position = Cura.ExtruderManager.activeExtruderIndex;
|
||||
Cura.MachineManager.setMaterial(extruder_position, base.currentItem.container_node);
|
||||
// Set the current material as the one to be activated (needed to force the UI update)
|
||||
base.newRootMaterialIdToSwitchTo = base.currentItem.root_material_id
|
||||
const extruder_position = Cura.ExtruderManager.activeExtruderIndex
|
||||
Cura.MachineManager.setMaterial(extruder_position, base.currentItem.container_node)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,6 +260,8 @@ Item
|
|||
modality: Qt.ApplicationModal
|
||||
onYes:
|
||||
{
|
||||
// Set the active material as the fallback. It will be selected when the current material is deleted
|
||||
base.newRootMaterialIdToSwitchTo = base.active_root_material_id
|
||||
base.materialManager.removeMaterial(base.currentItem.container_node);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue