diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-02-01 08:59:59 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-02-01 08:59:59 +0000 |
commit | 14e0012a3b94b799f9b0b0c7a2d1e1062927194a (patch) | |
tree | 22bc45e49c54e53e272d1a1375b5484b08d1b45c /gtk | |
parent | ac54c854d4d2f8be5cfc54906015f1b462b0df4b (diff) |
from Bill Meyer
fix for bug 714
svn path=/trunk/; revision=17140
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/io_stat.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gtk/io_stat.c b/gtk/io_stat.c index fe382a877e..e957fbce1f 100644 --- a/gtk/io_stat.c +++ b/gtk/io_stat.c @@ -886,20 +886,16 @@ io_stat_draw(io_stat_t *io) y_pos=draw_height-1-(val*draw_height)/max_y+top_y_border; } - /* dont need to draw anything if the segment - * is entirely above the top of the graph - */ - if( (prev_y_pos==0) && (y_pos==0) ){ - prev_y_pos=y_pos; - prev_x_pos=x_pos; - continue; - } - switch(io->graphs[i].plot_style){ case PLOT_STYLE_LINE: - gdk_draw_line(io->pixmap, io->graphs[i].gc, - prev_x_pos, prev_y_pos, - x_pos, y_pos); + /* dont need to draw anything if the segment + * is entirely above the top of the graph + */ + if( (prev_y_pos!=0) || (y_pos!=0) ){ + gdk_draw_line(io->pixmap, io->graphs[i].gc, + prev_x_pos, prev_y_pos, + x_pos, y_pos); + } break; case PLOT_STYLE_IMPULSE: if(val){ |