mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +08:00
WIP: Fix material name fetching in QML
This commit is contained in:
parent
628d031542
commit
c65192000e
@ -252,8 +252,18 @@ Column
|
|||||||
{
|
{
|
||||||
id: materialSelection
|
id: materialSelection
|
||||||
|
|
||||||
text: Cura.MachineManager.currentRootMaterialName[base.currentExtruderIndex]
|
property var currentRootMaterialName:
|
||||||
tooltip: Cura.MachineManager.currentRootMaterialName[base.currentExtruderIndex]
|
{
|
||||||
|
var materials = Cura.MachineManager.currentRootMaterialName;
|
||||||
|
var materialName = "";
|
||||||
|
if (base.currentExtruderIndex in materials) {
|
||||||
|
materialName = materials[base.currentExtruderIndex];
|
||||||
|
}
|
||||||
|
return materialName;
|
||||||
|
}
|
||||||
|
|
||||||
|
text: currentRootMaterialName
|
||||||
|
tooltip: currentRootMaterialName
|
||||||
visible: Cura.MachineManager.hasMaterials
|
visible: Cura.MachineManager.hasMaterials
|
||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user