1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-02-12 20:53:42 -05:00

Fix missing 0 on waterfall time scale

This commit is contained in:
Jon Beniston 2026-02-09 17:34:52 +00:00
parent a87fb6bce6
commit c139a56cfd

View File

@ -94,7 +94,8 @@ QString ScaleEngine::formatTick(double value, int decimalPlaces)
}
tmp = m_makeOpposite ? -actual : actual;
str += QString("%1").arg(tmp, 2, 'f', decimalPlaces, QChar('0'));
const int fieldWidth = (str.isEmpty() ? 1 : 2) + (decimalPlaces == 0 ? 0 : 1 + decimalPlaces);
str += QString("%1").arg(tmp, fieldWidth, 'f', decimalPlaces, QChar('0'));
return str;
}