mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +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
|
void
|
||||||
Region::set_length_internal (timecnt_t const & len)
|
Region::set_length_internal (timecnt_t const & len)
|
||||||
{
|
{
|
||||||
_last_length = _length;
|
timecnt_t l (len);
|
||||||
_length = len;
|
|
||||||
|
l.set_position (position());
|
||||||
|
|
||||||
|
_last_length = l;
|
||||||
|
_length = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue