From 6d967cddf8e7e950c157ec8ba8ebb7bc4108783e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 17 Aug 2017 16:04:52 +0300 Subject: [PATCH] Fix bug. Tags should contain only file base name. --HG-- branch : feature --- src/libs/vlayout/vtextmanager.cpp | 4 ++-- src/libs/vtools/dialogs/support/dialogeditlabel.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index 7af57dc1e..1714809b9 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -73,8 +73,8 @@ QMap PreparePlaceholders(const VAbstractPattern *doc) placeholders.insert(pl_author, doc->GetCompanyName()); placeholders.insert(pl_customer, doc->GetCustomerName()); placeholders.insert(pl_pExt, QString("val")); - placeholders.insert(pl_pFileName, QFileInfo(qApp->GetPPath()).fileName()); - placeholders.insert(pl_mFileName, QFileInfo(doc->MPath()).fileName()); + placeholders.insert(pl_pFileName, QFileInfo(qApp->GetPPath()).baseName()); + placeholders.insert(pl_mFileName, QFileInfo(doc->MPath()).baseName()); QString curSize; QString curHeight; diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp index 3104dfb9f..75f67227c 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp @@ -473,10 +473,10 @@ void DialogEditLabel::InitPlaceholders() m_placeholders.insert(pl_customer, qMakePair(tr("Customer name"), m_doc->GetCustomerName())); m_placeholders.insert(pl_pExt, qMakePair(tr("Pattern extension"), QString("val"))); - const QString patternFilePath = QFileInfo(qApp->GetPPath()).fileName(); + const QString patternFilePath = QFileInfo(qApp->GetPPath()).baseName(); m_placeholders.insert(pl_pFileName, qMakePair(tr("Pattern file name"), patternFilePath)); - const QString measurementsFilePath = QFileInfo(m_doc->MPath()).fileName(); + const QString measurementsFilePath = QFileInfo(m_doc->MPath()).baseName(); m_placeholders.insert(pl_mFileName, qMakePair(tr("Measurments file name"), measurementsFilePath)); QString curSize;