summaryrefslogtreecommitdiff
path: root/libs/ardour/session_playlists.cc
diff options
context:
space:
mode:
authorJulien ROGER <gulien.roger@gmail.com>2016-11-30 17:02:20 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-01-05 09:20:50 +0000
commit481334ae2a313e684897f3096107c2a832ca5759 (patch)
tree56d9acb58ca4ae8fed9ab62180eb692df577661c /libs/ardour/session_playlists.cc
parent0eedb7f86609c0d9ec9ecc7a0b77fa949d158937 (diff)
Proposed fix managing shared playlists (see #7150)
Actually, when duplicating a track with "share playlist", the current playlist is owned by the new created track(orig-track-id). The sharing mecanism is made by diskstreams pointing on the same(shared) playlist. Since playlist now owned by the new track, selecting another playlist in the original track "forgets" the playlist for this track.You can't select the shared playlist anymore from the original track. This commit adds a way to keep trace of shared playlist between tracks.
Diffstat (limited to 'libs/ardour/session_playlists.cc')
-rw-r--r--libs/ardour/session_playlists.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc
index a7e3c26613..d7780ea9b5 100644
--- a/libs/ardour/session_playlists.cc
+++ b/libs/ardour/session_playlists.cc
@@ -527,7 +527,10 @@ SessionPlaylists::playlists_for_track (boost::shared_ptr<Track> tr) const
vector<boost::shared_ptr<Playlist> > pl_tr;
for (vector<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
- if (((*i)->get_orig_track_id() == tr->id()) || (tr->playlist()->id() == (*i)->id())) {
+ if ( ((*i)->get_orig_track_id() == tr->id()) ||
+ (tr->playlist()->id() == (*i)->id()) ||
+ ((*i)->shared_with (tr->id())) )
+ {
pl_tr.push_back (*i);
}
}