Splitting a region doesn't affect layering: the two remaining pieces
will stay in the same place as the original one when compared to other regions on the playlist. git-svn-id: svn://localhost/trunk/ardour2@436 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7755c2dbfe
commit
1bde5eabc6
@ -1002,6 +1002,18 @@ Playlist::split_region (Region& region, jack_nframes_t playlist_position)
|
||||
add_region_internal (left, region.position(), true);
|
||||
add_region_internal (right, region.position() + before);
|
||||
|
||||
uint64_t orig_layer_op = region.last_layer_op();
|
||||
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||
if ((*i)->last_layer_op() > orig_layer_op) {
|
||||
(*i)->set_last_layer_op( (*i)->last_layer_op() + 1 );
|
||||
}
|
||||
}
|
||||
|
||||
left->set_last_layer_op ( orig_layer_op );
|
||||
right->set_last_layer_op ( orig_layer_op + 1);
|
||||
|
||||
layer_op_counter++;
|
||||
|
||||
finalize_split_region (®ion, left, right);
|
||||
|
||||
if (remove_region_internal (®ion, true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user