mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 06:36:29 +01:00
Playlist UI Tweaks: Fix some bugs related to old playlists without pgroup_ids
This commit is contained in:
parent
3b3473c6eb
commit
ba7237c152
2 changed files with 20 additions and 4 deletions
|
|
@ -189,6 +189,11 @@ SessionPlaylists::n_playlists () const
|
|||
boost::shared_ptr<Playlist>
|
||||
SessionPlaylists::for_pgroup (string pgroup_id, const PBD::ID& id)
|
||||
{
|
||||
if(pgroup_id.length()==0) {
|
||||
/*matching empty pgroup-id's would be meaningless*/
|
||||
return boost::shared_ptr<Playlist>();
|
||||
}
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (lock);
|
||||
|
||||
for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
|
||||
|
|
@ -213,10 +218,15 @@ SessionPlaylists::for_pgroup (string pgroup_id, const PBD::ID& id)
|
|||
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;
|
||||
|
||||
if(pgroup.length()==0) {
|
||||
/*matching empty pgroup-id's would be meaningless*/
|
||||
return pl_tr;
|
||||
}
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (lock);
|
||||
|
||||
for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
|
||||
if ((*i)->pgroup_id().compare(pgroup)==0) {
|
||||
pl_tr.push_back (*i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue