Fix material name update on sidebar

CURA-5084
This commit is contained in:
Lipu Fei 2018-03-13 17:00:30 +01:00
parent 7b3598e992
commit d2eb01d137
3 changed files with 5 additions and 24 deletions

View file

@ -346,15 +346,8 @@ Column
{
id: materialSelection
property var currentRootMaterialName:
{
var materials = Cura.MachineManager.currentRootMaterialName;
var materialName = "";
if (base.currentExtruderIndex in materials) {
materialName = materials[base.currentExtruderIndex];
}
return materialName;
}
property var activeExtruder: Cura.MachineManager.activeStack
property var currentRootMaterialName: activeExtruder.material.name
text: currentRootMaterialName
tooltip: currentRootMaterialName
@ -373,7 +366,7 @@ Column
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
function isMaterialSupported () {
return Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible") == "True"
return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True"
}
}
}