13
0

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:
Sampo Savolainen 2006-03-31 22:31:59 +00:00
parent 7755c2dbfe
commit 1bde5eabc6

View File

@ -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 (&region, left, right);
if (remove_region_internal (&region, true)) {