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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user