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;
}
const QStringList mList = m->ListAll();
const QStringList pList = doc->ListMeasurements();
const QSet<QString> match = pList.toSet().subtract(mList.toSet());
const QSet<QString> match = doc->ListMeasurements().toSet().subtract(m->ListAll().toSet());
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."));
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;
}