Fix path to directory with measurements if path in pattern wrong. Show status

unsaved for pattern if path was changed.

--HG--
branch : develop
This commit is contained in:
dismine 2014-07-10 15:03:37 +03:00
parent 227cc6a2c0
commit 169f61ae7a

View File

@ -2226,7 +2226,7 @@ void MainWindow::LoadPattern(const QString &fileName)
if (patternModified) if (patternModified)
{ {
//For situation where was fixed wrong formula need return for document status was modified. //For situation where was fixed wrong formula need return for document status was modified.
PatternWasModified(patternModified); PatternWasModified(!patternModified);
} }
helpLabel->setText(tr("File loaded")); helpLabel->setText(tr("File loaded"));
@ -2259,7 +2259,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &path, const Measureme
{ {
filter = tr("Individual measurements (*.vit)"); 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()) if (mPath.isEmpty())
{ {
@ -2276,6 +2276,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &path, const Measureme
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", mPath); VDomDocument::ValidateXML("://schema/individual_measurements.xsd", mPath);
} }
doc->SetPath(mPath); doc->SetPath(mPath);
PatternWasModified(false);
return mPath; return mPath;
} }
} }