mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
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:
parent
0ddfd7c873
commit
97e4a4f04a
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue