Clean up track widget event handling.

This commit is contained in:
Jonathan Moore Liles 2008-03-05 16:51:04 -06:00
parent 0cbfaff090
commit 03385eb347
2 changed files with 11 additions and 23 deletions

View File

@ -257,7 +257,7 @@ Region::handle ( int m )
log_end();
Loggable::block_end();
return 1;
return 0;
}
}
default:
@ -273,16 +273,12 @@ Region::handle ( int m )
ox = x() - X;
oy = y() - Y;
if ( Fl::event_state() && FL_CTRL )
{
if ( Fl::event_ctrl() )
os = _start;
// Fl::local_grab( this );
}
if ( Fl::event_button() == 2 )
if ( Fl::event_button2() )
{
if ( Fl::event_state() & FL_CTRL )
if ( Fl::event_ctrl() )
normalize();
else
{
@ -298,12 +294,8 @@ Region::handle ( int m )
redraw();
goto changed;
}
ret = Track_Widget::handle( m );
return ret | 1;
else
return Track_Widget::handle( m );
}
break;
}
@ -398,7 +390,6 @@ Region::handle ( int m )
changed:
// log_end();
return 1;
}

View File

@ -125,21 +125,18 @@ Track_Widget::handle ( int m )
return 1;
case FL_PUSH:
{
/* ox = x() - X; */
/* oy = y() - Y; */
if ( Fl::event_state() & FL_CTRL &&
Fl::event_button() == 3 )
Fl::event_button3() )
{
// log_destroy();
redraw();
_track->queue_delete( this );
return 0;
}
else
if ( Fl::event_button1() )
return 1;
return 0;
}
case FL_RELEASE:
if ( _drag )