Show tooltip about defined user material in the label placeholder list.
This commit is contained in:
parent
b6dc3f30b8
commit
bcb786958e
|
@ -11,6 +11,7 @@
|
||||||
- Fix incorrect comparison of the global length of passmark to minimal allowed value.
|
- Fix incorrect comparison of the global length of passmark to minimal allowed value.
|
||||||
- Make an increment name valid after user selected it from a completion list.
|
- Make an increment name valid after user selected it from a completion list.
|
||||||
- [smart-pattern/valentina#150] Fix Seam allowance not correct at intersection curve and axis.
|
- [smart-pattern/valentina#150] Fix Seam allowance not correct at intersection curve and axis.
|
||||||
|
- Show tooltip about defined user material in the label placeholder list.
|
||||||
|
|
||||||
# Valentina 0.7.49 July 1, 2021
|
# Valentina 0.7.49 July 1, 2021
|
||||||
- Fix crash.
|
- Fix crash.
|
||||||
|
|
|
@ -571,19 +571,25 @@ void DialogEditLabel::InitPlaceholders()
|
||||||
VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize
|
VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize
|
||||||
? QStringLiteral("vst") : QStringLiteral("vit")));
|
? QStringLiteral("vst") : QStringLiteral("vit")));
|
||||||
|
|
||||||
const QString materialDescription = tr("User material");
|
const QString userMaterialStr = tr("User material");
|
||||||
const QMap<int, QString> materials = m_doc->GetPatternMaterials();
|
const QMap<int, QString> materials = m_doc->GetPatternMaterials();
|
||||||
for (int i = 0; i < userMaterialPlaceholdersQuantity; ++i)
|
for (int i = 0; i < userMaterialPlaceholdersQuantity; ++i)
|
||||||
{
|
{
|
||||||
const QString number = QString::number(i+1);
|
const QString number = QString::number(i+1);
|
||||||
|
QString materialDescription;
|
||||||
|
|
||||||
QString value;
|
QString value;
|
||||||
if (materials.contains(i + 1))
|
if (materials.contains(i + 1))
|
||||||
{
|
{
|
||||||
value = materials.value(i + 1);
|
value = materials.value(i + 1);
|
||||||
|
materialDescription = QStringLiteral("%1 %2 <%3>").arg(userMaterialStr, number, value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
materialDescription = QStringLiteral("%1 %2").arg(userMaterialStr, number);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_placeholders.insert(pl_userMaterial + number, qMakePair(materialDescription + number, value));
|
m_placeholders.insert(pl_userMaterial + number, qMakePair(materialDescription, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user