Playlist UI tweaks: add function playlists_for_pgroup() (libardour)
This commit is contained in:
@@ -62,6 +62,7 @@ public:
|
||||
void destroy_region (boost::shared_ptr<Region>);
|
||||
boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &);
|
||||
void sync_all_regions_with_regions ();
|
||||
std::vector<boost::shared_ptr<Playlist> > playlists_for_pgroup (std::string pgroup);
|
||||
std::vector<boost::shared_ptr<Playlist> > playlists_for_track (boost::shared_ptr<Track>) const;
|
||||
std::vector<boost::shared_ptr<Playlist> > get_used () const;
|
||||
std::vector<boost::shared_ptr<Playlist> > get_unused () const;
|
||||
|
||||
@@ -210,6 +210,28 @@ SessionPlaylists::for_pgroup (string pgroup_id, const PBD::ID& id)
|
||||
return boost::shared_ptr<Playlist>();
|
||||
}
|
||||
|
||||
std::vector<boost::shared_ptr<Playlist> >
|
||||
SessionPlaylists::playlists_for_pgroup (std::string pgroup)
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (lock);
|
||||
|
||||
vector<boost::shared_ptr<Playlist> > pl_tr;
|
||||
|
||||
for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
|
||||
if ((*i)->pgroup_id().compare(pgroup)==0) {
|
||||
pl_tr.push_back (*i);
|
||||
}
|
||||
}
|
||||
|
||||
for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
|
||||
if ((*i)->pgroup_id().compare(pgroup)==0) {
|
||||
pl_tr.push_back (*i);
|
||||
}
|
||||
}
|
||||
|
||||
return pl_tr;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Playlist>
|
||||
SessionPlaylists::by_name (string name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user