summaryrefslogtreecommitdiff
path: root/gtk2_ardour/playlist_selector.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-10 19:20:15 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-10 19:20:15 +0000
commitd23a6de077181caa24af52229bb040c87ed34ebd (patch)
tree664ec7adbdf87826aced9b8d02d6b2603bf5d61d /gtk2_ardour/playlist_selector.cc
parent6e211e27e2027da328b6fe117f10e1962c007afb (diff)
fix for most (all? we can dream ...) issues involved in #4399 (editing multiply-applies operations to playlists used more than once), and as a side-issue, fix playlist selection which broke when we hid Diskstreams inside Tracks by using orig_track_id() rather than orig_diskstream_id()
git-svn-id: svn://localhost/ardour2/branches/3.0@10968 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/playlist_selector.cc')
-rw-r--r--gtk2_ardour/playlist_selector.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/playlist_selector.cc b/gtk2_ardour/playlist_selector.cc
index e0c51082a1..f81e199d62 100644
--- a/gtk2_ardour/playlist_selector.cc
+++ b/gtk2_ardour/playlist_selector.cc
@@ -121,6 +121,14 @@ PlaylistSelector::show_for (RouteUI* ruix)
for (TrackPlaylistMap::iterator x = trpl_map.begin(); x != trpl_map.end(); ++x) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (_session->route_by_id (x->first));
+
+ /* legacy sessions stored the diskstream ID as the original
+ * playlist owner. so try there instead.
+ */
+
+ if (tr == 0) {
+ tr = _session->track_by_diskstream_id (x->first);
+ }
if (tr == 0) {
continue;
@@ -222,8 +230,8 @@ PlaylistSelector::add_playlist_to_map (boost::shared_ptr<Playlist> pl)
TrackPlaylistMap::iterator x;
- if ((x = trpl_map.find (apl->get_orig_diskstream_id())) == trpl_map.end()) {
- x = trpl_map.insert (trpl_map.end(), make_pair (apl->get_orig_diskstream_id(), new list<boost::shared_ptr<Playlist> >));
+ if ((x = trpl_map.find (apl->get_orig_track_id())) == trpl_map.end()) {
+ x = trpl_map.insert (trpl_map.end(), make_pair (apl->get_orig_track_id(), new list<boost::shared_ptr<Playlist> >));
}
x->second->push_back (pl);