mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 20:29:09 +08: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
@ -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…
x
Reference in New Issue
Block a user