From c139a56cfda2d9d87205b9d046ca01483aa256da Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Mon, 9 Feb 2026 17:34:52 +0000 Subject: [PATCH] Fix missing 0 on waterfall time scale --- sdrgui/gui/scaleengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdrgui/gui/scaleengine.cpp b/sdrgui/gui/scaleengine.cpp index c65d02831..1b1709c05 100644 --- a/sdrgui/gui/scaleengine.cpp +++ b/sdrgui/gui/scaleengine.cpp @@ -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; }