13
0

Fix region-gain when trimming, cutting or partitioning regions

The during trim-front, the call order is
 1. Region::set_position_internal
 2. Region::set_length_internal

::set_position_internal sets `_last_length.set_position (position());`
but the later call ::set_length_internal does `_last_length = _length;`
This sets last_position() == position(), and later Region::mid_thaw()
does not call Region::recompute_at_start().

Region gain envelope was not updated.

see also 00a1b7cb24 and 13d10582f0
This commit is contained in:
Robin Gareus 2022-09-26 14:56:50 +02:00
parent d39f064756
commit 8ba21e7fff
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -492,10 +492,13 @@ void
Region::set_length_internal (timecnt_t const & len)
{
timecnt_t l (len);
timepos_t p (_last_length.position());
l.set_position (position());
_last_length = _length;
_last_length.set_position (p);
_length = l;
}