From d23a6de077181caa24af52229bb040c87ed34ebd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 10 Dec 2011 19:20:15 +0000 Subject: 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 --- gtk2_ardour/playlist_selector.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour/playlist_selector.cc') 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 tr = boost::dynamic_pointer_cast (_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 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 >)); + 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 >)); } x->second->push_back (pl); -- cgit v1.2.3