13
0

Make stacked region coverage frames correctly respect regions being muted.

git-svn-id: svn://localhost/ardour2/branches/3.0@5595 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-08-26 02:19:36 +00:00
parent 8934ff7867
commit c6be9b6888
3 changed files with 34 additions and 2 deletions

View File

@ -616,7 +616,7 @@ RegionView::update_coverage_frames (LayerDisplay d)
t++;
/* is this region is on top at time t? */
bool const new_me = (pl->top_region_at (t) == _region);
bool const new_me = (pl->top_unmuted_region_at (t) == _region);
/* finish off any old rect, if required */
if (cr && me != new_me) {

View File

@ -114,6 +114,7 @@ class Playlist : public SessionObject,
RegionList* regions_to_read (nframes_t start, nframes_t end);
boost::shared_ptr<Region> find_region (const PBD::ID&) const;
boost::shared_ptr<Region> top_region_at (nframes_t frame);
boost::shared_ptr<Region> top_unmuted_region_at (nframes_t frame);
boost::shared_ptr<Region> find_next_region (nframes_t frame, RegionPoint point, int dir);
nframes64_t find_next_region_boundary (nframes64_t frame, int dir);
bool region_is_shuffle_constrained (boost::shared_ptr<Region>);

View File

@ -1418,7 +1418,38 @@ Playlist::top_region_at (nframes_t frame)
delete rlist;
return region;
}
}
boost::shared_ptr<Region>
Playlist::top_unmuted_region_at (nframes_t frame)
{
RegionLock rlock (this);
RegionList *rlist = find_regions_at (frame);
for (RegionList::iterator i = rlist->begin(); i != rlist->end(); ) {
RegionList::iterator tmp = i;
++tmp;
if ((*i)->muted()) {
rlist->erase (i);
}
i = tmp;
}
boost::shared_ptr<Region> region;
if (rlist->size()) {
RegionSortByLayer cmp;
rlist->sort (cmp);
region = rlist->back();
}
delete rlist;
return region;
}
Playlist::RegionList*
Playlist::regions_to_read (nframes_t start, nframes_t end)