aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-11 12:22:56 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-11 13:40:49 -0800
commitc26fa209e329d7bfbc853c0b99c6aef0b98041dc (patch)
tree853e342e3cb912536b8a42dfe0158dd8b43a77af /profile.c
parentf0e471e0da191df4fda277240a39e3ed54858ec9 (diff)
downloadsubsurface-c26fa209e329d7bfbc853c0b99c6aef0b98041dc.tar.gz
Show CNS value in the profile mouseover
If we have per-sample CNS values, then show them in the profile tooltip. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 1d0ec38e2..24b9523fd 100644
--- a/profile.c
+++ b/profile.c
@@ -1922,6 +1922,10 @@ static void plot_string(struct plot_data *entry, char *buf, size_t bufsize,
memcpy(buf2, buf, bufsize);
snprintf(buf, bufsize, "%s\nNDL:%umin", buf2, entry->ndl / 60);
}
+ if (entry->cns) {
+ memcpy(buf2, buf, bufsize);
+ snprintf(buf, bufsize, "%s\nCNS:%u%%", buf2, entry->cns);
+ }
if (prefs.pp_graphs.po2) {
memcpy(buf2, buf, bufsize);
snprintf(buf, bufsize, "%s\npO" UTF8_SUBSCRIPT_2 ":%.2f", buf2, entry->po2);