diff options
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){ |