Playlist paste, always pastes on top

This commit is contained in:
Robin Gareus 2023-06-09 00:48:42 +02:00
parent c61fc45689
commit 03e0eea744
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 2 additions and 3 deletions

View File

@ -1273,7 +1273,7 @@ Playlist::paste (std::shared_ptr<Playlist> other, timepos_t const & position, fl
int itimes = (int) floor (times);
timepos_t pos = position;
timecnt_t const shift (other->_get_extent().second, other->_get_extent().first);
layer_t top = top_layer ();
layer_t top = top_layer () + 1;
{
RegionWriteLock rl1 (this);
@ -1286,13 +1286,12 @@ Playlist::paste (std::shared_ptr<Playlist> other, timepos_t const & position, fl
*/
add_region_internal (copy_of_region, r->position() + pos, rl1.thawlist);
copy_of_region->set_layer (copy_of_region->layer() + top);
set_layer (copy_of_region, copy_of_region->layer() + top);
}
pos += shift;
}
}
}
relayer ();
return 0;
}