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:
|
||||
{
|
||||
if ( Fl::event_x() < drawable_x() )
|
||||
return 0;
|
||||
|
||||
Logger log( this );
|
||||
|
||||
if ( Fl::event_button1() )
|
||||
|
|
|
@ -726,8 +726,10 @@ Control_Sequence::handle ( int m )
|
|||
{
|
||||
case FL_PUSH:
|
||||
{
|
||||
if ( test_press( FL_BUTTON1 ) &&
|
||||
Fl::event_x() >= Track::width() )
|
||||
if ( Fl::event_x() < drawable_x() )
|
||||
return 0;
|
||||
|
||||
if ( test_press( FL_BUTTON1 ) )
|
||||
{
|
||||
timeline->wrlock();
|
||||
|
||||
|
|
|
@ -383,6 +383,8 @@ Sequence::handle ( int m )
|
|||
return 1;
|
||||
case FL_ENTER:
|
||||
// DMESSAGE( "enter" );
|
||||
if ( Fl::event_x() >= drawable_x() )
|
||||
{
|
||||
if ( Sequence_Widget::pushed() )
|
||||
{
|
||||
if ( Sequence_Widget::pushed()->sequence()->class_name() == class_name() )
|
||||
|
@ -409,11 +411,18 @@ Sequence::handle ( int m )
|
|||
Fl_Group::handle( m );
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Fl_Group::handle(m);
|
||||
}
|
||||
case FL_DND_ENTER:
|
||||
case FL_DND_LEAVE:
|
||||
case FL_DND_RELEASE:
|
||||
return 1;
|
||||
case FL_MOVE:
|
||||
{
|
||||
if ( Fl::event_x() >= drawable_x() )
|
||||
{
|
||||
Sequence_Widget *r = event_widget();
|
||||
|
||||
|
@ -430,6 +439,7 @@ Sequence::handle ( int m )
|
|||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
Sequence_Widget *r = Sequence_Widget::pushed() ? Sequence_Widget::pushed() : event_widget();
|
||||
|
|
|
@ -1667,7 +1667,9 @@ Timeline::handle ( int m )
|
|||
{
|
||||
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 );
|
||||
|
||||
|
@ -1686,9 +1688,10 @@ Timeline::handle ( int m )
|
|||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
case FL_DRAG:
|
||||
{
|
||||
int ox = X - drag->x;
|
||||
|
@ -1740,7 +1743,7 @@ Timeline::handle ( int m )
|
|||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** retrun a pointer to the track named /name/, or NULL if no track is named /name/ */
|
||||
|
|
|
@ -706,6 +706,8 @@ Track::select ( int X, int Y, int W, int H,
|
|||
|
||||
Sequence *t = sequence();
|
||||
|
||||
X -= Track::width();
|
||||
|
||||
if ( ! ( t->y() > Y + H || t->y() + t->h() < Y ) )
|
||||
t->select_range( X, W );
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue