Include widget y() and h() in event_widget() test.

This commit is contained in:
Jonathan Moore Liles 2008-05-13 21:15:56 -05:00
parent a5a3e737bb
commit 02db2c1251
1 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,8 @@ Sequence::event_widget ( void )
{ {
nframes_t ets = timeline->xoffset + timeline->x_to_ts( Fl::event_x() - x() ); nframes_t ets = timeline->xoffset + timeline->x_to_ts( Fl::event_x() - x() );
for ( list <Sequence_Widget *>::const_reverse_iterator r = _widgets.rbegin(); r != _widgets.rend(); r++ ) for ( list <Sequence_Widget *>::const_reverse_iterator r = _widgets.rbegin(); r != _widgets.rend(); r++ )
if ( ets > (*r)->start() && ets < (*r)->start() + (*r)->length() ) if ( ets > (*r)->start() && ets < (*r)->start() + (*r)->length()
&& Fl::event_y() >= (*r)->y() && Fl::event_y() <= (*r)->y() + (*r)->h() )
return (*r); return (*r);
return NULL; return NULL;