diff --git a/src/app/dialogs/app/dialogindividualmeasurements.cpp b/src/app/dialogs/app/dialogindividualmeasurements.cpp index 6afe70b72..234bdb4b2 100644 --- a/src/app/dialogs/app/dialogindividualmeasurements.cpp +++ b/src/app/dialogs/app/dialogindividualmeasurements.cpp @@ -90,8 +90,8 @@ void DialogIndividualMeasurements::DialogAccepted() } //just in case - VDomDocument::ValidateXML("://schema/individual_measurements.xsd", "://tables/individual/individual.vit"); - QFile iMeasur("://tables/individual/individual.vit"); + VDomDocument::ValidateXML("://schema/individual_measurements.xsd", qApp->pathToTables()); + QFile iMeasur(qApp->pathToTables()); //TODO maybe make copy save? if ( iMeasur.copy(_tablePath) == false ) { diff --git a/src/app/widgets/vapplication.cpp b/src/app/widgets/vapplication.cpp index 64fe47382..064b89958 100644 --- a/src/app/widgets/vapplication.cpp +++ b/src/app/widgets/vapplication.cpp @@ -146,23 +146,7 @@ QString VApplication::pathToTables() const { if (_patternType == Pattern::Individual) { - #ifdef Q_OS_WIN - return QApplication::applicationDirPath() + QStringLiteral("/tables/individual"); - #else - #ifdef QT_DEBUG - return QApplication::applicationDirPath() + QStringLiteral("/tables/individual"); - #else - QDir dir(QApplication::applicationDirPath() + QStringLiteral("/tables/individual")); - if(dir.exist()) - { - return dir.absolutePath(); - } - else - { - return QStringLiteral("/usr/share/valentina/tables/individual"); - } - #endif - #endif + return "://tables/individual/individual.vit"; } else {