#include <algorithm>
#include <sigc++/bind.h>
#include <pbd/error.h>
+#include <pbd/stacktrace.h>
#include <ardour/playlist.h>
a.time == b.time &&
a.lines == b.lines &&
a.playlists == b.playlists &&
- a.redirects == b.redirects;
+ a.processors == b.processors;
}
+/** Clear everything from the Selection */
void
Selection::clear ()
{
clear_lines();
clear_time ();
clear_playlists ();
- clear_redirects ();
+ clear_processors ();
}
void
void
-Selection::clear_redirects ()
+Selection::clear_processors ()
{
- if (!redirects.empty()) {
- redirects.clear ();
- RedirectsChanged ();
+ if (!processors.empty()) {
+ processors.clear ();
+ ProcessorsChanged ();
}
}
/* Selections own their playlists */
for (PlaylistSelection::iterator i = playlists.begin(); i != playlists.end(); ++i) {
+ /* selections own their own regions, which are copies of the "originals". make them go away */
+ (*i)->drop_regions ();
(*i)->release ();
}
}
void
-Selection::toggle (boost::shared_ptr<Redirect> r)
+Selection::toggle (boost::shared_ptr<Processor> r)
{
- RedirectSelection::iterator i;
+ ProcessorSelection::iterator i;
- if ((i = find (redirects.begin(), redirects.end(), r)) == redirects.end()) {
- redirects.push_back (r);
+ if ((i = find (processors.begin(), processors.end(), r)) == processors.end()) {
+ processors.push_back (r);
} else {
- redirects.erase (i);
+ processors.erase (i);
}
- RedirectsChanged();
+ ProcessorsChanged();
}
void
-Selection::add (boost::shared_ptr<Redirect> r)
+Selection::add (boost::shared_ptr<Processor> i)
{
- if (find (redirects.begin(), redirects.end(), r) == redirects.end()) {
- redirects.push_back (r);
- RedirectsChanged();
+ if (find (processors.begin(), processors.end(), i) == processors.end()) {
+ processors.push_back (i);
+ ProcessorsChanged();
}
}
}
void
-Selection::remove (boost::shared_ptr<Redirect> r)
+Selection::remove (boost::shared_ptr<Processor> r)
{
- RedirectSelection::iterator i;
- if ((i = find (redirects.begin(), redirects.end(), r)) != redirects.end()) {
- redirects.erase (i);
- RedirectsChanged ();
+ ProcessorSelection::iterator i;
+ if ((i = find (processors.begin(), processors.end(), r)) != processors.end()) {
+ processors.erase (i);
+ ProcessorsChanged ();
}
}
}
void
-Selection::set (boost::shared_ptr<Redirect> r)
+Selection::set (boost::shared_ptr<Processor> i)
{
- clear_redirects ();
- add (r);
+ clear_processors ();
+ add (i);
}
void
lines.empty () &&
time.empty () &&
playlists.empty () &&
- redirects.empty ()
+ processors.empty ()
;
}