Update session range on trimming regions.

git-svn-id: svn://localhost/ardour2/branches/3.0@9004 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-03-01 16:23:31 +00:00
parent c89603465b
commit 28d3dd69de
6 changed files with 88 additions and 1 deletions

View file

@ -765,6 +765,7 @@ Session::track_playlist_changed (boost::weak_ptr<Track> wp)
if ((playlist = track->playlist()) != 0) {
playlist->RegionAdded.connect_same_thread (*this, boost::bind (&Session::playlist_region_added, this, _1));
playlist->RangesMoved.connect_same_thread (*this, boost::bind (&Session::playlist_ranges_moved, this, _1));
playlist->RegionsExtended.connect_same_thread (*this, boost::bind (&Session::playlist_regions_extended, this, _1));
}
}
@ -2545,6 +2546,14 @@ Session::playlist_ranges_moved (list<Evoral::RangeMove<framepos_t> > const & ran
}
}
void
Session::playlist_regions_extended (list<Evoral::Range<framepos_t> > const & ranges)
{
for (list<Evoral::Range<framepos_t> >::const_iterator i = ranges.begin(); i != ranges.end(); ++i) {
maybe_update_session_range (i->from, i->to);
}
}
/* Region management */
boost::shared_ptr<Region>