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
This commit is contained in:
Paul Davis 2011-12-10 19:20:15 +00:00
parent 6e211e27e2
commit d23a6de077
19 changed files with 220 additions and 100 deletions

View file

@ -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);