Timeline: Ensure that pushed widget gets FL_RELEASE event even when being dragged unto a another track.

This commit is contained in:
Jonathan Moore Liles 2015-09-08 17:28:47 -07:00
parent cf8e553bb4
commit 8fbcb4eb79
1 changed files with 6 additions and 4 deletions

View File

@ -321,10 +321,6 @@ Sequence::handle ( int m )
/* if ( m != FL_NO_EVENT ) */ /* if ( m != FL_NO_EVENT ) */
/* DMESSAGE( "%s", event_name( m ) ); */ /* DMESSAGE( "%s", event_name( m ) ); */
// if ( m == FL_RELEASE )
if ( ! Fl::pushed() )
Sequence_Widget::pushed( NULL );
switch ( m ) switch ( m )
{ {
case FL_KEYBOARD: case FL_KEYBOARD:
@ -469,7 +465,13 @@ Sequence::handle ( int m )
/* DMESSAGE( "Sequence widget = %p", r ); */ /* DMESSAGE( "Sequence widget = %p", r ); */
if ( m == FL_RELEASE ) if ( m == FL_RELEASE )
{
// in the case of track jumping, the sequence widget may not get the FL_RELEASE less we send it here:
if ( Sequence_Widget::pushed() )
Sequence_Widget::pushed()->handle(FL_RELEASE);
Sequence_Widget::pushed( NULL ); Sequence_Widget::pushed( NULL );
}
if ( r ) if ( r )
{ {