diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index d56595dad..659610086 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -173,7 +173,16 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte ui->labelCreationDate->setText(QDate::currentDate().toString(Qt::SystemLocaleLongDate)); ui->lineEditSize->setText(doc->GetPatternSize()); ui->checkBoxShowDate->setChecked(doc->IsDateVisible()); - ui->checkBoxShowMeasurements->setChecked(doc->IsMeasurementsVisible()); + if (doc->MPath().isEmpty() == true) + { + ui->checkBoxShowMeasurements->setChecked(false); + ui->checkBoxShowMeasurements->hide(); + } + else + { + ui->checkBoxShowMeasurements->setChecked(doc->IsMeasurementsVisible()); + } + connect(ui->lineEditPatternName, &QLineEdit::editingFinished, this, &DialogPatternProperties::GeneralInfoChanged); connect(ui->lineEditPatternNumber, &QLineEdit::editingFinished, this, &DialogPatternProperties::GeneralInfoChanged); diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 08bcb6c66..d4b209223 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -213,7 +213,7 @@ void VPattern::Parse(const Document &parse) qCDebug(vXML, "Show creation date"); break; case 16: - qCDebug(vXML, "Show creation measurements"); + qCDebug(vXML, "Show measurements"); break; default: qCDebug(vXML, "Wrong tag name %s", qUtf8Printable(domElement.tagName())); diff --git a/src/libs/ifc/schema/pattern/v0.3.3.xsd b/src/libs/ifc/schema/pattern/v0.3.3.xsd index 186f4cc6e..5084f71c1 100644 --- a/src/libs/ifc/schema/pattern/v0.3.3.xsd +++ b/src/libs/ifc/schema/pattern/v0.3.3.xsd @@ -390,7 +390,7 @@ - + diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index 02c2cf38b..ad59cbc98 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "vtextmanager.h" @@ -281,7 +282,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc) AddLine(tl); } // Measurements - tl.m_qsText = pDoc->MPath(); + tl.m_qsText = QDir::toNativeSeparators(pDoc->MPath()).split(QDir::separator()).last(); if (tl.m_qsText.isEmpty() == false && pDoc->IsMeasurementsVisible() == true) { tl.m_eFontWeight = QFont::Normal; diff --git a/src/libs/vlayout/vtextmanager.h b/src/libs/vlayout/vtextmanager.h index 1fa5a48de..aea6741ab 100644 --- a/src/libs/vlayout/vtextmanager.h +++ b/src/libs/vlayout/vtextmanager.h @@ -34,7 +34,7 @@ class VTextManager { public: VTextManager(); - ~VTextManager(); + virtual ~VTextManager(); virtual int GetSpacing() const; void SetFont(const QFont& font);