summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_processor_selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-08-01 22:18:46 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-08-01 22:18:46 +0000
commit6698f5f686bef82b0c9568558c83a3b9b3344700 (patch)
treeb955303ea57c1105183bed2891533b06aebb8c24 /gtk2_ardour/route_processor_selection.cc
parent4d1542d1e59737fb3f6464ebb5638ca64cb985e8 (diff)
use XML state to store processors in mixer (strips) and fixup crash caused by missing AutomationController for integer LADSPA plugin params
git-svn-id: svn://localhost/ardour2/trunk@2215 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_processor_selection.cc')
-rw-r--r--gtk2_ardour/route_processor_selection.cc62
1 files changed, 9 insertions, 53 deletions
diff --git a/gtk2_ardour/route_processor_selection.cc b/gtk2_ardour/route_processor_selection.cc
index 33dd1bfe7b..552de1b412 100644
--- a/gtk2_ardour/route_processor_selection.cc
+++ b/gtk2_ardour/route_processor_selection.cc
@@ -46,8 +46,8 @@ RouteRedirectSelection::operator= (const RouteRedirectSelection& other)
bool
operator== (const RouteRedirectSelection& a, const RouteRedirectSelection& b)
{
- return a.processors == b.processors &&
- a.routes == b.routes;
+ // XXX MUST TEST PROCESSORS SOMEHOW
+ return a.routes == b.routes;
}
void
@@ -72,63 +72,19 @@ RouteRedirectSelection::clear_routes ()
}
void
-RouteRedirectSelection::add (boost::shared_ptr<Processor> r)
+RouteRedirectSelection::add (XMLNode* node)
{
- if (find (processors.begin(), processors.end(), r) == processors.end()) {
- processors.push_back (r);
-
- // XXX SHAREDPTR FIXME
- // void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
- // r->GoingAway.connect (mem_fun(*this, pmf));
-
- ProcessorsChanged();
- }
-}
-
-void
-RouteRedirectSelection::add (const vector<boost::shared_ptr<Processor> >& rlist)
-{
- bool changed = false;
-
- for (vector<boost::shared_ptr<Processor> >::const_iterator i = rlist.begin(); i != rlist.end(); ++i) {
- if (find (processors.begin(), processors.end(), *i) == processors.end()) {
- processors.push_back (*i);
-
- // XXX SHAREDPTR FIXME
-
- //void (RouteRedirectSelection::*pmf)(Redirect*) = &RouteRedirectSelection::remove;
- // (*i)->GoingAway.connect (mem_fun(*this, pmf));
- changed = true;
- }
- }
-
- if (changed) {
- ProcessorsChanged();
- }
+ // XXX check for duplicate
+ processors.add (node);
+ ProcessorsChanged();
}
void
-RouteRedirectSelection::remove (boost::shared_ptr<Processor> r)
-{
- list<boost::shared_ptr<Processor> >::iterator i;
- if ((i = find (processors.begin(), processors.end(), r)) != processors.end()) {
- processors.erase (i);
- ProcessorsChanged ();
- }
-}
-
-void
-RouteRedirectSelection::set (boost::shared_ptr<Processor> r)
+RouteRedirectSelection::set (XMLNode* node)
{
clear_processors ();
- add (r);
-}
-
-void
-RouteRedirectSelection::set (const vector<boost::shared_ptr<Processor> >& rlist)
-{
- clear_processors ();
- add (rlist);
+ processors.set (node);
+ ProcessorsChanged ();
}
void