From 318c27088bebbaa5ad190006bc393a5b1944136e Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 20 Feb 2008 04:51:07 -0600 Subject: [PATCH] Reduce the number of peaks read when drawing region. --- Region.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Region.C b/Region.C index 020276e..5d9d8d4 100644 --- a/Region.C +++ b/Region.C @@ -331,7 +331,7 @@ Region::draw ( int X, int Y, int W, int H ) // fl_push_clip( x() + Fl::box_dx( box() ), y(), w() - Fl::box_dw( box() ), h() ); - draw_waveform( rx, Y, rw, H, _clip, _start + offset, _end - offset, _scale, _color ); + draw_waveform( rx, Y, rw, H, _clip, _start + offset, min( (_end - _start) - offset, _end), _scale, _color ); fl_color( FL_BLACK ); fl_line( rx, Y, rx, Y + H );