mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Reverted a previous workaround that fixed errors when selecting material and variants in the application menus - CURA-4386 CURA-4379
This commit is contained in:
parent
afb83fac88
commit
f0e89b7e01
1 changed files with 18 additions and 2 deletions
|
@ -66,7 +66,15 @@ Menu
|
|||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setActiveMaterial(model.id)
|
||||
onTriggered:
|
||||
{
|
||||
// This workaround is done because of the application menus for materials and variants for multiextrusion printers.
|
||||
// The extruder menu would always act on the correspoding extruder only, instead of acting on the extruder selected in the UI.
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(object)
|
||||
|
@ -101,7 +109,15 @@ Menu
|
|||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setActiveMaterial(model.id)
|
||||
onTriggered:
|
||||
{
|
||||
// This workaround is done because of the application menus for materials and variants for multiextrusion printers.
|
||||
// The extruder menu would always act on the correspoding extruder only, instead of acting on the extruder selected in the UI.
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: brandMaterialsMenu.insertItem(index, object)
|
||||
onObjectRemoved: brandMaterialsMenu.removeItem(object)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue