diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-08-28 21:12:16 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2017-04-19 09:36:53 +1000 |
commit | 23d8c41f0183b35c9fb68b53b78b5fedf8714485 (patch) | |
tree | e312246154462c900bfe49a34fee4b5ebeaf3436 /libs/ardour/session.cc | |
parent | 7ba9223f9f43e1624f6d9b86534519a5f30f976c (diff) |
Use XMLNode::get/set_property API in ARDOUR::Session class
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index ded851faae..2b86c62bea 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3361,12 +3361,12 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i */ XMLProperty const * target = (*i)->property (X_("target")); if (!target) { - (*i)->add_property ("type", "dangling-aux-send"); + (*i)->set_property ("type", "dangling-aux-send"); continue; } boost::shared_ptr<Route> r = route_by_id (target->value()); if (!r || boost::dynamic_pointer_cast<Track>(r)) { - (*i)->add_property ("type", "dangling-aux-send"); + (*i)->set_property ("type", "dangling-aux-send"); continue; } } @@ -3374,20 +3374,18 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i (*i)->remove_property (X_("bitslot")); } else if (role && (role->value() == X_("Send") || role->value() == X_("Aux"))) { - char buf[32]; Delivery::Role xrole; uint32_t bitslot = 0; xrole = Delivery::Role (string_2_enum (role->value(), xrole)); std::string name = Send::name_and_id_new_send(*this, xrole, bitslot, false); - snprintf (buf, sizeof (buf), "%" PRIu32, bitslot); (*i)->remove_property (X_("bitslot")); (*i)->remove_property (X_("name")); - (*i)->add_property ("bitslot", buf); - (*i)->add_property ("name", name); + (*i)->set_property ("bitslot", bitslot); + (*i)->set_property ("name", name); } else if (type && type->value() == X_("intreturn")) { (*i)->remove_property (X_("bitslot")); - (*i)->add_property ("ignore-bitslot", "1"); + (*i)->set_property ("ignore-bitslot", "1"); } else if (type && type->value() == X_("return")) { // Return::set_state() generates a new one @@ -3396,7 +3394,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i else if (type && type->value() == X_("port")) { // PortInsert::set_state() handles the bitslot (*i)->remove_property (X_("bitslot")); - (*i)->add_property ("ignore-name", "1"); + (*i)->set_property ("ignore-name", "1"); } } } |