Browse Source

Insert imported regions at offset of drop.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
6b48c0d629
2 changed files with 10 additions and 3 deletions
  1. +3
    -0
      Region.H
  2. +7
    -3
      Track.H

+ 3
- 0
Region.H 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; }
};

+ 7
- 3
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;
}


Loading…
Cancel
Save