diff --git a/src/dialogs/app/dialogstandardmeasurements.cpp b/src/dialogs/app/dialogstandardmeasurements.cpp
index d5e9d0ee9..36a061279 100644
--- a/src/dialogs/app/dialogstandardmeasurements.cpp
+++ b/src/dialogs/app/dialogstandardmeasurements.cpp
@@ -153,6 +153,7 @@ void DialogStandardMeasurements::LoadStandardTables()
filters << "*.vst";
QDir tablesDir(qApp->pathToTables());
tablesDir.setNameFilters(filters);
+ tablesDir.setCurrent(qApp->pathToTables());
const QStringList allFiles = tablesDir.entryList(QDir::NoDotAndDotDot | QDir::Files);
if (allFiles.isEmpty() == true)
@@ -164,12 +165,13 @@ void DialogStandardMeasurements::LoadStandardTables()
for (int i = 0; i < allFiles.size(); ++i)
{
+ QFileInfo fi(allFiles.at(i));
QFile file(allFiles.at(i));
if (file.open(QIODevice::ReadOnly))
{
try
{
- VDomDocument::ValidatePattern("://schema/standard_measurements.xsd", allFiles.at(i));
+ VDomDocument::ValidatePattern("://schema/standard_measurements.xsd", fi.absoluteFilePath());
}
catch(VException &e)
{
@@ -181,7 +183,7 @@ void DialogStandardMeasurements::LoadStandardTables()
try
{
m.setContent(&file);
- ui->comboBoxTables->addItem(m.Description(), QVariant(allFiles.at(i)));
+ ui->comboBoxTables->addItem(m.Description(), QVariant(fi.absoluteFilePath()));
}
catch(VException &e)
{
@@ -193,7 +195,7 @@ void DialogStandardMeasurements::LoadStandardTables()
}
else
{
- qWarning()<
0
0
- 439
- 247
+ 452
+ 115
@@ -19,11 +19,17 @@
-
-
+
0
0
+
+
+ 206
+ 0
+
+
Pattern piece name
@@ -33,7 +39,14 @@
-
-
+
+
+
+ 0
+ 0
+
+
+
@@ -53,7 +66,14 @@
-
-
+
+
+
+ 0
+ 0
+
+
+
diff --git a/src/dialogs/app/pages.cpp b/src/dialogs/app/pages.cpp
index eb729b1d7..68b27a7c9 100644
--- a/src/dialogs/app/pages.cpp
+++ b/src/dialogs/app/pages.cpp
@@ -115,8 +115,7 @@ QGroupBox *ConfigurationPage::LangGroup()
defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
QString checkedLocale = settings.value("configuration/locale", defaultLocale).toString();
- QString m_langPath = QApplication::applicationDirPath();
- m_langPath.append(qApp->translationsPath());
+ QString m_langPath = qApp->translationsPath();
QDir dir(m_langPath);
QStringList fileNames = dir.entryList(QStringList("valentina_*.qm"));
diff --git a/src/main.cpp b/src/main.cpp
index 9618e82c2..8b1711f86 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -84,10 +84,10 @@ int main(int argc, char *argv[])
QTranslator appTranslator;
#ifdef Q_OS_WIN
- appTranslator.load("valentina_" + checkedLocale, "."+qApp->translationsPath());
+ appTranslator.load("valentina_" + checkedLocale, qApp->translationsPath());
#else
#ifdef QT_DEBUG
- appTranslator.load("valentina_" + checkedLocale, "."+qApp->translationsPath());
+ appTranslator.load("valentina_" + checkedLocale, qApp->translationsPath());
#else
appTranslator.load("valentina_" + checkedLocale, qApp->translationsPath());
#endif
diff --git a/src/widgets/vapplication.cpp b/src/widgets/vapplication.cpp
index 5b0f4d494..dd2ac8575 100644
--- a/src/widgets/vapplication.cpp
+++ b/src/widgets/vapplication.cpp
@@ -132,10 +132,10 @@ QString VApplication::pathToTables() const
if (_patternType == Pattern::Individual)
{
#ifdef Q_OS_WIN
- return QStringLiteral("/tables/individual");
+ return QApplication::applicationDirPath() + QStringLiteral("/tables/individual");
#else
#ifdef QT_DEBUG
- return QStringLiteral("/tables/individual");
+ return QApplication::applicationDirPath() + QStringLiteral("/tables/individual");
#else
return QStringLiteral("/usr/share/valentina/tables/individual");
#endif
@@ -144,10 +144,10 @@ QString VApplication::pathToTables() const
else
{
#ifdef Q_OS_WIN
- return QStringLiteral("/tables/standard");
+ return QApplication::applicationDirPath() + QStringLiteral("/tables/standard");
#else
#ifdef QT_DEBUG
- return QStringLiteral("/tables/standard");
+ return QApplication::applicationDirPath() + QStringLiteral("/tables/standard");
#else
return QStringLiteral("/usr/share/valentina/tables/standard");
#endif
@@ -158,10 +158,10 @@ QString VApplication::pathToTables() const
QString VApplication::translationsPath() const
{
#ifdef Q_OS_WIN
- return QStringLiteral("/translations");
+ return QApplication::applicationDirPath() + QStringLiteral("/translations");
#else
#ifdef QT_DEBUG
- return QStringLiteral("/translations");
+ return QApplication::applicationDirPath() + QStringLiteral("/translations");
#else
return QStringLiteral("/usr/share/valentina/translations");
#endif
diff --git a/src/xml/vpattern.cpp b/src/xml/vpattern.cpp
index b236a987b..24ed010bb 100644
--- a/src/xml/vpattern.cpp
+++ b/src/xml/vpattern.cpp
@@ -201,7 +201,7 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
if (domElement.isNull() == false)
{
QStringList tags;
- tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes;
+ tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements;
switch (tags.indexOf(domElement.tagName()))
{
case 0: // TagDraw
@@ -232,6 +232,8 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
break;
case 4: // TagNotes
break;
+ case 5: // TagMeasurements
+ break;
default:
qWarning()<<"Wrong tag name"<