Commit f73d5e3b authored by David Edmundson's avatar David Edmundson
Browse files

Avoid formatting NaN values

Formatter has an option to return "" when null is passed as a value.
This patch also treats NaN is null.

Typically this only happens during loading conditions.

(cherry picked from commit 1ba373f3)
parent fac5c2c3
......@@ -237,7 +237,7 @@ static QString formatNumber(const QVariant &value, Unit unit, MetricPrefix prefi
qreal amount = value.toDouble();
if (!options.testFlag(FormatOptionShowNull) && qFuzzyIsNull(amount)) {
if (!options.testFlag(FormatOptionShowNull) && (qFuzzyIsNull(amount) || qIsNaN(amount))) {
return QString();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment