mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Get how we name variants from the machine definition
CURA-2116
This commit is contained in:
parent
6bcea1e309
commit
8c63216fdf
2 changed files with 27 additions and 2 deletions
|
@ -183,8 +183,23 @@ Column
|
|||
Label
|
||||
{
|
||||
id: variantLabel
|
||||
text: (Cura.MachineManager.hasVariants && Cura.MachineManager.hasMaterials) ? catalog.i18nc("@label","Nozzle & Material:"):
|
||||
Cura.MachineManager.hasVariants ? catalog.i18nc("@label","Nozzle:") : catalog.i18nc("@label","Material:");
|
||||
text:
|
||||
{
|
||||
var label;
|
||||
if(Cura.MachineManager.hasVariants && Cura.MachineManager.hasMaterials)
|
||||
{
|
||||
label = "%1 & %2".arg(Cura.MachineManager.activeDefinitionVariantsName).arg(catalog.i18nc("@label","Material"));
|
||||
}
|
||||
else if(Cura.MachineManager.hasVariants)
|
||||
{
|
||||
label = Cura.MachineManager.activeDefinitionVariantsName;
|
||||
}
|
||||
else
|
||||
{
|
||||
label = catalog.i18nc("@label","Material");
|
||||
}
|
||||
return "%1:".arg(label);
|
||||
}
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue