projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trim dependence on evoral types.hpp and Beats.hpp
[ardour.git]
/
libs
/
ardour
/
session_playlists.cc
diff --git
a/libs/ardour/session_playlists.cc
b/libs/ardour/session_playlists.cc
index 8fdafad09dfd95d9e56fda7828cdb830b3bfe9ee..649d42902bfa4f846a840c9c8c7ba17913ce858e 100644
(file)
--- a/
libs/ardour/session_playlists.cc
+++ b/
libs/ardour/session_playlists.cc
@@
-333,15
+333,39
@@
SessionPlaylists::maybe_delete_unused (boost::function<int(boost::shared_ptr<Pla
{
vector<boost::shared_ptr<Playlist> > playlists_tbd;
{
vector<boost::shared_ptr<Playlist> > playlists_tbd;
+ bool delete_remaining = false;
+ bool keep_remaining = false;
+
for (List::iterator x = unused_playlists.begin(); x != unused_playlists.end(); ++x) {
for (List::iterator x = unused_playlists.begin(); x != unused_playlists.end(); ++x) {
+ if (keep_remaining) {
+ break;
+ }
+
+ if (delete_remaining) {
+ playlists_tbd.push_back (*x);
+ continue;
+ }
+
int status = ask (*x);
switch (status) {
case -1:
int status = ask (*x);
switch (status) {
case -1:
+ // abort
return true;
return true;
- case 0:
+ case -2:
+ // keep this and all later
+ keep_remaining = true;
+ break;
+
+ case 2:
+ // delete this and all later
+ delete_remaining = true;
+ // no break;
+
+ case 1:
+ // delete this
playlists_tbd.push_back (*x);
break;
playlists_tbd.push_back (*x);
break;