Timeline: Fix input bugs caused by track layout changes.
This commit is contained in:
parent
1ff528c8bf
commit
102670cb31
|
@ -100,6 +100,9 @@ public:
|
||||||
{
|
{
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
{
|
{
|
||||||
|
if ( Fl::event_x() < drawable_x() )
|
||||||
|
return 0;
|
||||||
|
|
||||||
Logger log( this );
|
Logger log( this );
|
||||||
|
|
||||||
if ( Fl::event_button1() )
|
if ( Fl::event_button1() )
|
||||||
|
|
|
@ -726,8 +726,10 @@ Control_Sequence::handle ( int m )
|
||||||
{
|
{
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
{
|
{
|
||||||
if ( test_press( FL_BUTTON1 ) &&
|
if ( Fl::event_x() < drawable_x() )
|
||||||
Fl::event_x() >= Track::width() )
|
return 0;
|
||||||
|
|
||||||
|
if ( test_press( FL_BUTTON1 ) )
|
||||||
{
|
{
|
||||||
timeline->wrlock();
|
timeline->wrlock();
|
||||||
|
|
||||||
|
|
|
@ -383,6 +383,8 @@ Sequence::handle ( int m )
|
||||||
return 1;
|
return 1;
|
||||||
case FL_ENTER:
|
case FL_ENTER:
|
||||||
// DMESSAGE( "enter" );
|
// DMESSAGE( "enter" );
|
||||||
|
if ( Fl::event_x() >= drawable_x() )
|
||||||
|
{
|
||||||
if ( Sequence_Widget::pushed() )
|
if ( Sequence_Widget::pushed() )
|
||||||
{
|
{
|
||||||
if ( Sequence_Widget::pushed()->sequence()->class_name() == class_name() )
|
if ( Sequence_Widget::pushed()->sequence()->class_name() == class_name() )
|
||||||
|
@ -409,11 +411,18 @@ Sequence::handle ( int m )
|
||||||
Fl_Group::handle( m );
|
Fl_Group::handle( m );
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Fl_Group::handle(m);
|
||||||
|
}
|
||||||
case FL_DND_ENTER:
|
case FL_DND_ENTER:
|
||||||
case FL_DND_LEAVE:
|
case FL_DND_LEAVE:
|
||||||
case FL_DND_RELEASE:
|
case FL_DND_RELEASE:
|
||||||
return 1;
|
return 1;
|
||||||
case FL_MOVE:
|
case FL_MOVE:
|
||||||
|
{
|
||||||
|
if ( Fl::event_x() >= drawable_x() )
|
||||||
{
|
{
|
||||||
Sequence_Widget *r = event_widget();
|
Sequence_Widget *r = event_widget();
|
||||||
|
|
||||||
|
@ -430,6 +439,7 @@ Sequence::handle ( int m )
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Sequence_Widget *r = Sequence_Widget::pushed() ? Sequence_Widget::pushed() : event_widget();
|
Sequence_Widget *r = Sequence_Widget::pushed() ? Sequence_Widget::pushed() : event_widget();
|
||||||
|
|
|
@ -1667,7 +1667,9 @@ Timeline::handle ( int m )
|
||||||
{
|
{
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
{
|
{
|
||||||
if ( test_press( FL_BUTTON1 ) || test_press( FL_BUTTON1 + FL_CTRL ) )
|
if (
|
||||||
|
Fl::event_x() >= Track::width() &&
|
||||||
|
( test_press( FL_BUTTON1 ) || test_press( FL_BUTTON1 + FL_CTRL ) ))
|
||||||
{
|
{
|
||||||
assert( ! drag );
|
assert( ! drag );
|
||||||
|
|
||||||
|
@ -1686,9 +1688,10 @@ Timeline::handle ( int m )
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
case FL_DRAG:
|
case FL_DRAG:
|
||||||
{
|
{
|
||||||
int ox = X - drag->x;
|
int ox = X - drag->x;
|
||||||
|
|
|
@ -706,6 +706,8 @@ Track::select ( int X, int Y, int W, int H,
|
||||||
|
|
||||||
Sequence *t = sequence();
|
Sequence *t = sequence();
|
||||||
|
|
||||||
|
X -= Track::width();
|
||||||
|
|
||||||
if ( ! ( t->y() > Y + H || t->y() + t->h() < Y ) )
|
if ( ! ( t->y() > Y + H || t->y() + t->h() < Y ) )
|
||||||
t->select_range( X, W );
|
t->select_range( X, W );
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue