summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-10 11:40:35 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-10 11:54:15 +0100
commit6ad73a8f043be283c07df34c6a5a43fee1b444e8 (patch)
tree792bdf62cd3036f9e367573bf2a828aed7e70380 /gtk-gui.c
parente07531dd10a9126544b4cb949b05ee2d15a50d5d (diff)
downloadsubsurface-6ad73a8f043be283c07df34c6a5a43fee1b444e8.tar.gz
Improve logic handling events
We now throw away redundant events, just as we throw away other redundant data coming from the dive computer. Events are considered redundant if they are less than 61 seconds apart and identical. This also improves the display of the remaining events in the profile as we now show the value of the event, if it is present (for example for a deco event we show the duration of the deepest stop). Finally, for events that define a range (so they set the beginning flag and assume and end flag some time later) we no loger show the triangle but assume that some other code handles visualizing them (as happens for the ceiling events). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 665a4abef..690b2a488 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1231,7 +1231,7 @@ void attach_tooltip(int x, int y, int w, int h, const char *text)
rect->y = y;
rect->width = w;
rect->height = h;
- tooltip_rects[tooltips].text = text;
+ tooltip_rects[tooltips].text = strdup(text);
tooltips++;
}