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
This commit is contained in:
BojanKverh 2016-07-25 19:10:13 +02:00
parent 8aabd5a8d9
commit 88055db170
3 changed files with 4 additions and 2 deletions

View file

@ -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
{

View file

@ -176,6 +176,8 @@ void VPatternConverter::ApplyPatches()
ToV0_3_3();
ValidateXML(XSDSchema(0x000303), fileName);
V_FALLTHROUGH
case (0x000303):
break;
default:
break;
}

View file

@ -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;