diff options
author | Carl Hetherington <carl@carlh.net> | 2012-04-15 21:04:44 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-04-15 21:04:44 +0000 |
commit | 8367cacf150be852b9baf308caebe23603f36ff6 (patch) | |
tree | 688fbdb9ded2775baf1618f09ce1313fab040445 /libs/ardour/region.cc | |
parent | 23973bae24b7f569e26c7f869a103aacbaf66ab2 (diff) |
Update MidiRegion::_start_beats on trimming the front of a MIDI region; reset _start_beats with _start on MidiRegion::fix_negative_start(). May help with #4736.
git-svn-id: svn://localhost/ardour2/branches/3.0@11984 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r-- | libs/ardour/region.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 66c0b84ae9..99906665d7 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -686,7 +686,7 @@ Region::set_start (framepos_t pos) return; } - _start = pos; + set_start_internal (pos); _whole_file = false; first_edit (); invalidate_transients (); @@ -701,6 +701,7 @@ Region::trim_start (framepos_t new_position) if (locked() || position_locked()) { return; } + framepos_t new_start; frameoffset_t const start_shift = new_position - _position; @@ -732,7 +733,7 @@ Region::trim_start (framepos_t new_position) return; } - _start = new_start; + set_start_internal (new_start); _whole_file = false; first_edit (); @@ -888,7 +889,7 @@ Region::trim_to_internal (framepos_t position, framecnt_t length) PropertyChange what_changed; if (_start != new_start) { - _start = new_start; + set_start_internal (new_start); what_changed.add (Properties::start); } @@ -1648,3 +1649,8 @@ Region::post_set (const PropertyChange& pc) } } +void +Region::set_start_internal (framecnt_t s) +{ + _start = s; +} |