diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-29 12:47:59 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-29 12:47:59 +0000 |
commit | 515d19c74519599c53d6fc85c1af2647f390d95f (patch) | |
tree | 1f1dbbe3beccbe37872bf1ec565bc7aa7c6a240c /libs/ardour/playlist.cc | |
parent | b88e7fdcca8ef8fa4c22f93c2934b30713ab4716 (diff) |
Implement 2532: option to show tracks with regions under the playhead.
git-svn-id: svn://localhost/ardour2/branches/3.0@6207 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index aa41bf65d1..bcc4c6061d 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -2521,3 +2521,17 @@ Playlist::set_explicit_relayering (bool e) _explicit_relayering = e; } + + +bool +Playlist::has_region_at (nframes64_t const p) const +{ + RegionLock (const_cast<Playlist *> (this)); + + RegionList::const_iterator i = regions.begin (); + while (i != regions.end() && !(*i)->covers (p)) { + ++i; + } + + return (i != regions.end()); +} |