From 88055db1708868a36c4d96118669ed1fefbd64b2 Mon Sep 17 00:00:00 2001 From: BojanKverh Date: Mon, 25 Jul 2016 19:10:13 +0200 Subject: [PATCH] Show measurements option is now disabled and not hidden, if there are no measurements associated with the current pattern. Finished pattern converter and refactored measurement file extraction in text manager class --HG-- branch : feature --- src/app/valentina/dialogs/dialogpatternproperties.cpp | 2 +- src/libs/ifc/xml/vpatternconverter.cpp | 2 ++ src/libs/vlayout/vtextmanager.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index 659610086..82e4889f3 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -176,7 +176,7 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte if (doc->MPath().isEmpty() == true) { ui->checkBoxShowMeasurements->setChecked(false); - ui->checkBoxShowMeasurements->hide(); + ui->checkBoxShowMeasurements->setEnabled(false); } else { diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 34647259c..5723fadca 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -176,6 +176,8 @@ void VPatternConverter::ApplyPatches() ToV0_3_3(); ValidateXML(XSDSchema(0x000303), fileName); V_FALLTHROUGH + case (0x000303): + break; default: break; } diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index ad59cbc98..ee1a7cb04 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -282,7 +282,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc) AddLine(tl); } // Measurements - tl.m_qsText = QDir::toNativeSeparators(pDoc->MPath()).split(QDir::separator()).last(); + tl.m_qsText = QFileInfo(pDoc->MPath()).fileName(); if (tl.m_qsText.isEmpty() == false && pDoc->IsMeasurementsVisible() == true) { tl.m_eFontWeight = QFont::Normal;