From 5551b853b95835d65d86545165f1a2ed1c97a286 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Sep 2017 17:45:57 +0300 Subject: [PATCH] Extend number of user material placeholders up to 20. --HG-- branch : develop --- src/libs/vmisc/def.h | 2 +- src/libs/vtools/dialogs/support/dialogeditlabel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 4eaef17a3..70724003e 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -379,7 +379,7 @@ extern const QString pl_mInterlining; extern const QString pl_wCut; extern const QString pl_wOnFold; -const int userMaterialPlaceholdersQuantity = 9; +const int userMaterialPlaceholdersQuantity = 20; extern const QStringList labelTemplatePlaceholders; diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp index daf03a9cf..0a6c0f3c4 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp @@ -500,7 +500,7 @@ void DialogEditLabel::InitPlaceholders() const QMap materials = m_doc->GetPatternMaterials(); for (int i = 0; i < userMaterialPlaceholdersQuantity; ++i) { - const QString number = QString::number(i + 1); + const QString number = QString(" %1").arg(i + 1, 2, 10, QLatin1Char('0')); QString value; if (materials.contains(i + 1))