diff options
author | Carl Hetherington <carl@carlh.net> | 2010-05-09 00:47:16 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-05-09 00:47:16 +0000 |
commit | ea1a103b26c87b821e41329b4eef7cf5d91770ee (patch) | |
tree | 0aaaa2f99fe6a739d76660248d8cfd32d6073285 /libs | |
parent | 45b5b19da287cb3a5c21d37a13c54bc541c5f282 (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.cc | 10 |
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; |