Add activeQualityDisplayName to remove code duplication

CURA-6846
This commit is contained in:
Lipu Fei 2019-10-04 14:25:16 +02:00
parent 618cbffaa7
commit c528000268
3 changed files with 38 additions and 32 deletions

View file

@ -20,17 +20,7 @@ RowLayout
{
if (Cura.MachineManager.activeStack)
{
var text = Cura.MachineManager.activeQualityOrQualityChangesName
// If this is a custom quality, add intent (if present) and quality it is based on
if (Cura.MachineManager.isActiveQualityCustom)
{
if (Cura.MachineManager.activeIntentName != "")
{
text += " - " + Cura.MachineManager.activeIntentName
}
text += " - " + Cura.MachineManager.activeQualityGroup.getName()
}
var text = Cura.MachineManager.activeQualityDisplayName
if (!Cura.MachineManager.hasNotSupportedQuality)
{