summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-25 01:25:12 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-25 01:25:12 -0700
commit499cc0c87c61d517c7953a945da39f4db249f364 (patch)
tree54c91be8191e9516e82c0e05b8890c70549001ce /profile.c
parent5ca49b0460f36ac969b7ef388f586782d584b36d (diff)
downloadsubsurface-499cc0c87c61d517c7953a945da39f4db249f364.tar.gz
Don't plot an event if an event is disabled in ev_namelist
We don't have a way to actually configure this in the app, yet, but toggling the bits in the debugger shows that this works, so commit this code now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 11b01b503..810c47391 100644
--- a/profile.c
+++ b/profile.c
@@ -202,6 +202,17 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st
int i, depth = 0;
int x,y;
+ /* is plotting this event disabled? */
+ if (event->name) {
+ for (i = 0; i < evn_used; i++) {
+ if (! strcmp(event->name, ev_namelist[i].ev_name)) {
+ if (ev_namelist[i].plot_ev)
+ break;
+ else
+ return;
+ }
+ }
+ }
for (i = 0; i < pi->nr; i++) {
struct plot_data *data = pi->entry + i;
if (event->time.seconds < data->sec)