Clean up track widget event handling.
This commit is contained in:
parent
0cbfaff090
commit
03385eb347
21
Region.C
21
Region.C
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue