Merged with trunk R1141
[ardour.git] / libs / ardour / send.cc
index 2c2a1524166399dec9140af1e13211a1bc363d9c..73dbf11ad58bfa925caa804f72dab81a1907c46a 100644 (file)
@@ -37,7 +37,6 @@ Send::Send (Session& s, Placement p)
        : Redirect (s, s.next_send_name(), p)
 {
        _metering = false;
-       save_state (_("initial state"));
        RedirectCreated (this); /* EMIT SIGNAL */
 }
 
@@ -50,7 +49,6 @@ Send::Send (Session& s, const XMLNode& node)
                throw failed_constructor();
        }
 
-       save_state (_("initial state"));
        RedirectCreated (this); /* EMIT SIGNAL */
 }
 
@@ -58,7 +56,6 @@ Send::Send (const Send& other)
        : Redirect (other._session, other._session.next_send_name(), other.placement())
 {
        _metering = false;
-       save_state (_("initial state"));
        RedirectCreated (this); /* EMIT SIGNAL */
 }
 
@@ -77,7 +74,7 @@ XMLNode&
 Send::state(bool full)
 {
        XMLNode *node = new XMLNode("Send");
-       node->add_child_nocopy (Redirect::state(full));
+       node->add_child_nocopy (Redirect::state (full));
        return *node;
 }
 
@@ -86,11 +83,15 @@ Send::set_state(const XMLNode& node)
 {
        XMLNodeList nlist = node.children();
        XMLNodeIterator niter;
-       
+
+       /* Send has regular IO automation (gain, pan) */
+
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                if ((*niter)->name() == Redirect::state_node_name) {
                        Redirect::set_state (**niter);
                        break;
+               } else if ((*niter)->name() == X_("Automation")) {
+                       IO::set_automation_state (*(*niter));
                }
        }