diff options
author | Robin Gareus <robin@gareus.org> | 2015-11-21 22:45:26 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-11-21 22:45:26 +0100 |
commit | 8a26e561c52d7b4afffc5dd10a464cace9ff2950 (patch) | |
tree | b753275388da531ed33b69bc81b25735516082f2 /libs/ardour/session_playlists.cc | |
parent | c0e05f7306463c1c096538b4783ce465fdacea25 (diff) |
cont'd 20262abe (keep all playlists)
Diffstat (limited to 'libs/ardour/session_playlists.cc')
-rw-r--r-- | libs/ardour/session_playlists.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc index cc2f1b25ab..649d42902b 100644 --- a/libs/ardour/session_playlists.cc +++ b/libs/ardour/session_playlists.cc @@ -333,10 +333,16 @@ SessionPlaylists::maybe_delete_unused (boost::function<int(boost::shared_ptr<Pla { vector<boost::shared_ptr<Playlist> > playlists_tbd; - bool delete_all = false; + bool delete_remaining = false; + bool keep_remaining = false; for (List::iterator x = unused_playlists.begin(); x != unused_playlists.end(); ++x) { - if (delete_all) { + + if (keep_remaining) { + break; + } + + if (delete_remaining) { playlists_tbd.push_back (*x); continue; } @@ -348,9 +354,14 @@ SessionPlaylists::maybe_delete_unused (boost::function<int(boost::shared_ptr<Pla // abort return true; + case -2: + // keep this and all later + keep_remaining = true; + break; + case 2: // delete this and all later - delete_all = true; + delete_remaining = true; // no break; case 1: |