summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-09 00:47:16 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-09 00:47:16 +0000
commitea1a103b26c87b821e41329b4eef7cf5d91770ee (patch)
tree0aaaa2f99fe6a739d76660248d8cfd32d6073285 /libs
parent45b5b19da287cb3a5c21d37a13c54bc541c5f282 (diff)
Reset both IO names rather than just one when setting up the use of a track template.
git-svn-id: svn://localhost/ardour2/branches/3.0@7085 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index f0aaf054ff..2d4aefd388 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1828,13 +1828,19 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
/*NOTREACHED*/
}
- IO::set_name_in_state (*node_copy.children().front(), name);
+ /* set IO children to use the new name */
+ XMLNodeList const & children = node_copy.children ();
+ for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
+ if ((*i)->name() == IO::state_node_name) {
+ IO::set_name_in_state (**i, name);
+ }
+ }
Track::zero_diskstream_id_in_xml (node_copy);
try {
shared_ptr<Route> route (XMLRouteFactory (node_copy, 3000));
-
+
if (route == 0) {
error << _("Session: cannot create track/bus from template description") << endmsg;
goto out;