The error message should display the translated measurement name.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-21 15:49:43 +02:00
parent 0ef10c01b0
commit 24d5aa0f53

View File

@ -401,14 +401,17 @@ QSharedPointer<VMeasurements> MainWindow::OpenMeasurementFile(const QString &pat
throw e; throw e;
} }
const QStringList mList = m->ListAll(); const QSet<QString> match = doc->ListMeasurements().toSet().subtract(m->ListAll().toSet());
const QStringList pList = doc->ListMeasurements();
const QSet<QString> match = pList.toSet().subtract(mList.toSet());
if (not match.isEmpty()) if (not match.isEmpty())
{ {
QList<QString> list = match.toList();
for (int i = 0; i < list.size(); ++i)
{
list[i] = qApp->TrVars()->MToUser(list.at(i));
}
VException e(tr("Measurement file doesn't include all required measurements.")); VException e(tr("Measurement file doesn't include all required measurements."));
e.AddMoreInformation(tr("Please, additionaly provide: %1").arg(QStringList(match.toList()).join(", "))); e.AddMoreInformation(tr("Please, additionaly provide: %1").arg(QStringList(list).join(", ")));
throw e; throw e;
} }