Fix event_widget detection for overlapping widgets.
This commit is contained in:
parent
9bb9f1bd9d
commit
8856fd8b9e
|
@ -47,7 +47,7 @@ public:
|
||||||
case FL_DND_DRAG:
|
case FL_DND_DRAG:
|
||||||
case FL_DND_ENTER:
|
case FL_DND_ENTER:
|
||||||
case FL_ENTER:
|
case FL_ENTER:
|
||||||
dump();
|
// dump();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_DND_LEAVE:
|
case FL_DND_LEAVE:
|
||||||
case FL_DND_RELEASE:
|
case FL_DND_RELEASE:
|
||||||
|
|
6
Region.C
6
Region.C
|
@ -205,7 +205,7 @@ Region::handle ( int m )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FL_RELEASE:
|
case FL_RELEASE:
|
||||||
fl_cursor( FL_CURSOR_DEFAULT );
|
Track_Widget::handle( m );
|
||||||
copied = false;
|
copied = false;
|
||||||
trimming = NO;
|
trimming = NO;
|
||||||
// Fl::release();
|
// Fl::release();
|
||||||
|
@ -375,5 +375,7 @@ Region::normalize ( void )
|
||||||
void
|
void
|
||||||
Region::dump ( void )
|
Region::dump ( void )
|
||||||
{
|
{
|
||||||
printf( "%lu { \"%s\" %lu %lu }\n", _offset, _clip->name(), _start, _end );
|
// printf( "Region %p %lu { \"%s\" %lu %lu }\n", this, _offset, _clip->name(), _start, _end );
|
||||||
|
/* how about in STD? */
|
||||||
|
printf( "Region\n\t%p\n\toffset\n\t\t%lu\n\tranage\n\t\t%lu\n\t\t%lu\n\tsource\n\t\t\"%s\"\n\n", this, _offset, _start, _end, _clip->name() );
|
||||||
}
|
}
|
||||||
|
|
2
Track.C
2
Track.C
|
@ -75,7 +75,7 @@ Track::event_widget ( void )
|
||||||
{
|
{
|
||||||
// FIXME: doesn't handle overlap!
|
// FIXME: doesn't handle overlap!
|
||||||
int ets = timeline->xoffset + timeline->x_to_ts( Fl::event_x() );
|
int ets = timeline->xoffset + timeline->x_to_ts( Fl::event_x() );
|
||||||
for ( list <Track_Widget *>::iterator r = _widgets.begin(); r != _widgets.end(); r++ )
|
for ( list <Track_Widget *>::const_reverse_iterator r = _widgets.rbegin(); r != _widgets.rend(); r++ )
|
||||||
if ( ets > (*r)->offset() && ets < (*r)->offset() + (*r)->length() )
|
if ( ets > (*r)->offset() && ets < (*r)->offset() + (*r)->length() )
|
||||||
return (*r);
|
return (*r);
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
dump ( void )
|
||||||
|
{
|
||||||
|
printf( "Unknown %p %lu %lu %lu\n", this, _offset, _start, _end );
|
||||||
|
}
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
draw_label ( const char *label, Fl_Align align )
|
draw_label ( const char *label, Fl_Align align )
|
||||||
{
|
{
|
||||||
|
@ -216,6 +222,7 @@ public:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case FL_RELEASE:
|
case FL_RELEASE:
|
||||||
|
dump();
|
||||||
fl_cursor( FL_CURSOR_DEFAULT );
|
fl_cursor( FL_CURSOR_DEFAULT );
|
||||||
return 1;
|
return 1;
|
||||||
case FL_DRAG:
|
case FL_DRAG:
|
||||||
|
|
Loading…
Reference in New Issue