diff --git a/Audio_Track.H b/Audio_Track.H index 4e93f3e..b27bf13 100644 --- a/Audio_Track.H +++ b/Audio_Track.H @@ -47,7 +47,7 @@ public: case FL_DND_DRAG: case FL_DND_ENTER: case FL_ENTER: - dump(); +// dump(); return 1; case FL_DND_LEAVE: case FL_DND_RELEASE: diff --git a/Region.C b/Region.C index 6aa7fca..f00e2a0 100644 --- a/Region.C +++ b/Region.C @@ -205,7 +205,7 @@ Region::handle ( int m ) break; } case FL_RELEASE: - fl_cursor( FL_CURSOR_DEFAULT ); + Track_Widget::handle( m ); copied = false; trimming = NO; // Fl::release(); @@ -375,5 +375,7 @@ Region::normalize ( void ) 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() ); } diff --git a/Track.C b/Track.C index b07a431..ef751f5 100644 --- a/Track.C +++ b/Track.C @@ -75,7 +75,7 @@ Track::event_widget ( void ) { // FIXME: doesn't handle overlap! int ets = timeline->xoffset + timeline->x_to_ts( Fl::event_x() ); - for ( list ::iterator r = _widgets.begin(); r != _widgets.end(); r++ ) + for ( list ::const_reverse_iterator r = _widgets.rbegin(); r != _widgets.rend(); r++ ) if ( ets > (*r)->offset() && ets < (*r)->offset() + (*r)->length() ) return (*r); diff --git a/Track_Widget.H b/Track_Widget.H index 1b2aa72..30a1090 100644 --- a/Track_Widget.H +++ b/Track_Widget.H @@ -123,6 +123,12 @@ public: } + virtual void + dump ( void ) + { + printf( "Unknown %p %lu %lu %lu\n", this, _offset, _start, _end ); + } + virtual void draw_label ( const char *label, Fl_Align align ) { @@ -216,6 +222,7 @@ public: return 1; } case FL_RELEASE: + dump(); fl_cursor( FL_CURSOR_DEFAULT ); return 1; case FL_DRAG: