From 36b657c62f9f45a25eee877e37ebd3137d6070ad Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Tue, 14 Nov 2023 18:07:58 +0000 Subject: [PATCH] Use u::formatNumberScientific in TextVisualisationChannel --- source/app/ui/visualisations/textvisualisationchannel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/app/ui/visualisations/textvisualisationchannel.cpp b/source/app/ui/visualisations/textvisualisationchannel.cpp index f49fa5980..ebc28ea0a 100644 --- a/source/app/ui/visualisations/textvisualisationchannel.cpp +++ b/source/app/ui/visualisations/textvisualisationchannel.cpp @@ -19,6 +19,8 @@ #include "textvisualisationchannel.h" #include "visualisationinfo.h" +#include "shared/utils/string.h" + #include "rendering/graphrenderer.h" #include "app/preferences.h" @@ -29,7 +31,7 @@ using namespace Qt::Literals::StringLiterals; void TextVisualisationChannel::apply(double value, ElementVisual& elementVisual) const { - elementVisual._text = QString::number(value, 'g', 3); + elementVisual._text = u::formatNumberScientific(value); } void TextVisualisationChannel::apply(const QString& value, ElementVisual& elementVisual) const