summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Henrik Brautaset Aronsen <subsurface@henrik.synth.no>2013-02-05 09:28:24 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-06 06:30:21 +1100
commit3fd6fd6e5b51863a3cc050df9d6c2342efc88d32 (patch)
tree61bb56c4cddfb3fa263ddb275312b5bf56010e39 /profile.c
parentf334175bdd1ae7c622791306dd0f47ddf7f5e13e (diff)
downloadsubsurface-3fd6fd6e5b51863a3cc050df9d6c2342efc88d32.tar.gz
Align last temperature text end of temperature plot line
The temperature plot line was drawn to the end of the dive, but the last temperature plot text was printed near the last temperature *sample*. This was most visible on dives/test27.xml where two "20˚C" were printed on top of each other at the start of the dive, while nothing was printed at the end. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/profile.c b/profile.c
index 22a74986e..86f7537af 100644
--- a/profile.c
+++ b/profile.c
@@ -914,11 +914,11 @@ static void plot_temperature_text(struct graphics_context *gc, struct plot_info
for (i = 0; i < pi->nr; i++) {
struct plot_data *entry = pi->entry+i;
int mkelvin = entry->temperature;
+ sec = entry->sec;
if (!mkelvin)
continue;
last_temperature = mkelvin;
- sec = entry->sec;
/* don't print a temperature
* if it's been less than 5min and less than a 2K change OR
* if it's been less than 2min OR if the change from the