Global variable to count placeholders quantity.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-08-30 07:43:00 +03:00
parent 2885d95a43
commit 4a6e1e104f
2 changed files with 4 additions and 2 deletions

View File

@ -140,10 +140,10 @@ DialogPatternMaterials::~DialogPatternMaterials()
//---------------------------------------------------------------------------------------------------------------------
void DialogPatternMaterials::SetPatternMaterials(const QMap<int, QString> &list)
{
ui->tableWidget->setRowCount(9);
ui->tableWidget->setRowCount(userMaterialPlaceholdersQuantity);
QLatin1String per("%");
for (int i = 0; i < 9; ++i)
for (int i = 0; i < userMaterialPlaceholdersQuantity; ++i)
{
QTableWidgetItem *item = new QTableWidgetItem(per + qApp->TrVars()->PlaceholderToUser(pl_userMaterial) +
QString::number(i + 1) + per);

View File

@ -379,6 +379,8 @@ extern const QString pl_mInterlining;
extern const QString pl_wCut;
extern const QString pl_wOnFold;
const int userMaterialPlaceholdersQuantity = 9;
extern const QStringList labelTemplatePlaceholders;
extern const QString cursorArrowOpenHand;