Insert imported regions at offset of drop.

pull/3/head
Jonathan Moore Liles 2008-02-17 23:25:26 -06:00
parent 3b02169d31
commit 6b48c0d629
2 changed files with 10 additions and 3 deletions

View File

@ -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; }
};

10
Track.H
View File

@ -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;
}