The MachineManager doesn't have the extruder stacks but the active

machine does, so use it when setting the compatible material diameter to
the current extruder.

Contributes to CURA-5857.
This commit is contained in:
Diego Prado Gesto 2018-10-25 16:27:16 +02:00
parent 197bf057cc
commit f1d94d921c

View File

@ -405,15 +405,15 @@ Cura.MachineAction
{ {
if (settingsTabs.currentIndex > 0) if (settingsTabs.currentIndex > 0)
{ {
manager.updateMaterialForDiameter(settingsTabs.currentIndex - 1); manager.updateMaterialForDiameter(settingsTabs.currentIndex - 1)
} }
} }
function setValueFunction(value) function setValueFunction(value)
{ {
if (settingsTabs.currentIndex > 0) if (settingsTabs.currentIndex > 0)
{ {
var extruderIndex = (settingsTabs.currentIndex - 1).toString(); var extruderIndex = (settingsTabs.currentIndex - 1).toString()
Cura.MachineManager.extruders[extruderIndex].compatibleMaterialDiameter = value; Cura.MachineManager.activeMachine.extruders[extruderIndex].compatibleMaterialDiameter = value
} }
} }
property bool isExtruderSetting: true property bool isExtruderSetting: true