Hash must contains only active dimensions.

This commit is contained in:
Roman Telezhynskyi 2020-10-03 18:52:10 +03:00
parent eef01f1d3e
commit a083d2ff18

View File

@ -223,7 +223,18 @@ bool VMeasurement::IsGradationHeightValid(const QString &height)
//---------------------------------------------------------------------------------------------------------------------
QString VMeasurement::CorrectionHash(qreal baseA, qreal baseB, qreal baseC)
{
return QStringList({QString::number(baseA), QString::number(baseB), QString::number(baseC)}).join(';');
QStringList hashBlocks{QString::number(baseA)};
if (baseB > 0)
{
hashBlocks.append(QString::number(baseB));
}
if (baseC > 0)
{
hashBlocks.append(QString::number(baseC));
}
return hashBlocks.join(';');
}
//---------------------------------------------------------------------------------------------------------------------