mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-22 18:31:11 -07:00
Display brand and color name in the material menu if they are different than "generic"
Contributes to CURA-341
This commit is contained in:
parent
19fd2795e1
commit
0da07b55ce
1 changed files with 16 additions and 1 deletions
|
|
@ -36,7 +36,22 @@ Menu
|
||||||
}
|
}
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: model.name;
|
text:
|
||||||
|
{
|
||||||
|
var result = model.name
|
||||||
|
|
||||||
|
if(model.metadata.brand != undefined && model.metadata.brand != "Generic")
|
||||||
|
{
|
||||||
|
result = model.metadata.brand + " " + result
|
||||||
|
}
|
||||||
|
|
||||||
|
if(model.metadata.color_name != undefined && model.metadata.color_name != "Generic")
|
||||||
|
{
|
||||||
|
result = result + " (%1)".arg(model.metadata.color_name)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.id == Cura.MachineManager.activeMaterialId;
|
checked: model.id == Cura.MachineManager.activeMaterialId;
|
||||||
exclusiveGroup: group;
|
exclusiveGroup: group;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue