From 169f61ae7ac2151831333b8883fbd51ff5269cdd Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 10 Jul 2014 15:03:37 +0300 Subject: [PATCH] Fix path to directory with measurements if path in pattern wrong. Show status unsaved for pattern if path was changed. --HG-- branch : develop --- src/app/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 5a2040ce8..376dfcaa6 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -2226,7 +2226,7 @@ void MainWindow::LoadPattern(const QString &fileName) if (patternModified) { //For situation where was fixed wrong formula need return for document status was modified. - PatternWasModified(patternModified); + PatternWasModified(!patternModified); } helpLabel->setText(tr("File loaded")); @@ -2259,7 +2259,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &path, const Measureme { filter = tr("Individual measurements (*.vit)"); } - QString mPath = QFileDialog::getOpenFileName(this, tr("Open file"), QDir::homePath(), filter); + QString mPath = QFileDialog::getOpenFileName(this, tr("Open file"), qApp->pathToTables(), filter); if (mPath.isEmpty()) { @@ -2276,6 +2276,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &path, const Measureme VDomDocument::ValidateXML("://schema/individual_measurements.xsd", mPath); } doc->SetPath(mPath); + PatternWasModified(false); return mPath; } }