diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-14 20:03:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-14 20:03:40 +0000 |
commit | e3c67bceb864adc10764e901b87ad8b6677caebd (patch) | |
tree | 98cc093e7255dc658bd839a1bbf6c92f76b58331 /libs/ardour/region.cc | |
parent | df5e700f90d9fd6c803e8e85c56f3fe8118bc101 (diff) |
implement methods in TempoMap for walking a given distance along a tempo map and returning the resulting time; add a new property, _length_beats, to MidiRegion; use previously mentioned methods to keep _length_beats up to date as regions are moved AND as tempo map changes occur
git-svn-id: svn://localhost/ardour2/branches/3.0@8274 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r-- | libs/ardour/region.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 585689a656..a0da02be2a 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -462,7 +462,7 @@ Region::set_length (framecnt_t len, void */*src*/) _last_length = _length; - _length = len; + set_length_internal (len); _whole_file = false; first_edit (); maybe_uncopy (); @@ -477,6 +477,12 @@ Region::set_length (framecnt_t len, void */*src*/) } void +Region::set_length_internal (framecnt_t len) +{ + _length = len; +} + +void Region::maybe_uncopy () { /* this does nothing but marked a semantic moment once upon a time */ @@ -925,7 +931,7 @@ Region::trim_to_internal (framepos_t position, framecnt_t length, void */*src*/) if (!property_changes_suspended()) { _last_length = _length; } - _length = length; + set_length_internal (length); what_changed.add (Properties::length); } if (_position != position) { |