summaryrefslogtreecommitdiffstats
path: root/stats/legend.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-03 00:54:52 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-03 13:41:15 -0800
commit9c4157ca359635352993ec5dc1e852456b3b11ca (patch)
tree747d1f68061d9d570bddf8f81295af6c38192c03 /stats/legend.cpp
parent7b0455b4d8af2d8a917810cc467376a6d7653a23 (diff)
downloadsubsurface-9c4157ca359635352993ec5dc1e852456b3b11ca.tar.gz
statistics: fix silly typo in legend code
After each column, instead of setting the new x-variable, the new value was added to the old value. This led to ever increasing gaps. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/legend.cpp')
-rw-r--r--stats/legend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/stats/legend.cpp b/stats/legend.cpp
index 927e972c8..457ce42f6 100644
--- a/stats/legend.cpp
+++ b/stats/legend.cpp
@@ -93,7 +93,7 @@ void Legend::resize()
y += fontHeight;
++displayedItems;
}
- x += nextX;
+ x = nextX;
width = nextX;
if (width >= size.width() / 2.0) // More than half the chart-width -> give up
break;