change semantics of Region::set_length() to preserve current position

Before the nutempo changes, a call to Region::set_length() only set the length
of the region.  Now that Region::_length is a duple of (duration,position),
maintain thesame semantics so that the call only affects the duration part of
the duple.  Theoretically we might at some point want/need
Region::set_length_and_position() but that is not the case at this point,
This commit is contained in:
Paul Davis 2021-03-13 18:56:14 -07:00
parent 0ddfd7c873
commit 97e4a4f04a

View file

@ -491,8 +491,12 @@ Region::set_length (timecnt_t const & len)
void
Region::set_length_internal (timecnt_t const & len)
{
_last_length = _length;
_length = len;
timecnt_t l (len);
l.set_position (position());
_last_length = l;
_length = l;
}
void