aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-03-02 07:40:23 -0500
committerJohn Thacker <johnthacker@gmail.com>2023-03-02 17:40:17 +0000
commit224d8dba97cb63b6096bfb6b9fe19c7c52679c31 (patch)
tree6f6078c843ae84c5e72ae3934b37e0b9c2c2b222
parent36395517d348718ab3af01df9ea058f16a578631 (diff)
Qt: Sequence diagram comments are not numbers
The comments in the flow diagrams are conceptually an extra y Axis ticker label on the right. Tell QCustomPlot that we don't want to render things that look like sufficiently large numbers in scientific notation. Fix #18879
-rw-r--r--ui/qt/sequence_diagram.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/qt/sequence_diagram.cpp b/ui/qt/sequence_diagram.cpp
index 702f1f13ce..4628915b1a 100644
--- a/ui/qt/sequence_diagram.cpp
+++ b/ui/qt/sequence_diagram.cpp
@@ -55,6 +55,9 @@ SequenceDiagram::SequenceDiagram(QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *
// yaxis2 (comment): Extra info ("Comment" in GTK+)
// valueAxis->setAutoTickStep(false);
+
+ /* The comments are not numbers, don't try to pretty print exponentials. */
+ commentAxis->setNumberFormat("f");
QList<QCPAxis *> axes;
axes << value_axis_ << key_axis_ << comment_axis_;
QPen no_pen(Qt::NoPen);