diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-26 22:00:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-26 22:00:14 +0000 |
commit | d6f92493140bea1bb7546c6be3de3381e6a148bf (patch) | |
tree | c8bf3d62e1c5b9e713cd11950ebab2373cba767d /libs | |
parent | f33c92e0c9e9fe30fcc009c27b5a51b08e5d8cef (diff) |
ensure that the name used the control out IO for a route always uses the desired name
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4909 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/route.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 91c3423388..4553bf2909 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -1836,8 +1836,20 @@ Route::_set_state (const XMLNode& node, bool call_base) delete _control_outs; _control_outs = new IO (_session, coutname); - _control_outs->set_state (**(child->children().begin())); + /* fix up the control out name in the XML before setting it. + Otherwise track templates don't work because the control + outs end up with the stored template name, rather than + the new name of the track based on the template. + */ + + XMLProperty* prop = (*child->children().begin())->property ("name"); + if (prop) { + prop->set_value (coutname); + } + + _control_outs->set_state (**(child->children().begin())); + } else if (child->name() == X_("Comment")) { /* XXX this is a terrible API design in libxml++ */ |