diff --git a/Region.H b/Region.H index 02257f8..eccada8 100644 --- a/Region.H +++ b/Region.H @@ -50,4 +50,7 @@ public: Track * track ( void ) { return _track; } void track ( Track *t ) { _track = t; } + + nframes_t offset ( void ) { return _offset; } + void offset ( nframes_t o ) { _offset = o; } }; diff --git a/Track.H b/Track.H index 4c01131..d94c357 100644 --- a/Track.H +++ b/Track.H @@ -106,15 +106,19 @@ public: Clip *c = Clip::from_file( file ); -// free( file ); - if ( ! c ) { free( file ); return 0; } - this->add( new Region( c ) ); + + Region *r = new Region( c ); + + r->offset( timeline.x_to_ts( Fl::event_x() ) ); + r->position( Fl::event_x(), r->y() ); + + this->add( r ); return 1; }