mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
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:
parent
8934ff7867
commit
c6be9b6888
3 changed files with 34 additions and 2 deletions
|
|
@ -616,7 +616,7 @@ RegionView::update_coverage_frames (LayerDisplay d)
|
||||||
t++;
|
t++;
|
||||||
|
|
||||||
/* is this region is on top at time 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 */
|
/* finish off any old rect, if required */
|
||||||
if (cr && me != new_me) {
|
if (cr && me != new_me) {
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ class Playlist : public SessionObject,
|
||||||
RegionList* regions_to_read (nframes_t start, nframes_t end);
|
RegionList* regions_to_read (nframes_t start, nframes_t end);
|
||||||
boost::shared_ptr<Region> find_region (const PBD::ID&) const;
|
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_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);
|
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);
|
nframes64_t find_next_region_boundary (nframes64_t frame, int dir);
|
||||||
bool region_is_shuffle_constrained (boost::shared_ptr<Region>);
|
bool region_is_shuffle_constrained (boost::shared_ptr<Region>);
|
||||||
|
|
|
||||||
|
|
@ -1420,6 +1420,37 @@ Playlist::top_region_at (nframes_t frame)
|
||||||
return region;
|
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::RegionList*
|
||||||
Playlist::regions_to_read (nframes_t start, nframes_t end)
|
Playlist::regions_to_read (nframes_t start, nframes_t end)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue