diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-05-08 15:29:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-05-08 15:29:00 +0000 |
commit | c8039e30326235d2ed6508ad52839b6e0518bf51 (patch) | |
tree | 724d00874e4064e329e6391eed2336cca92851b6 /libs | |
parent | 58adc8806a5fcac90021504b4f0017be4f537815 (diff) |
when changing a Route name, make that sure that a Route with ControlOuts changes the CO port names too
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5066 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/route.h | 2 | ||||
-rw-r--r-- | libs/ardour/route.cc | 17 | ||||
-rw-r--r-- | libs/ardour/track.cc | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 7dab4eecb7..03dcc597a2 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -79,6 +79,8 @@ class Route : public IO std::string comment() { return _comment; } void set_comment (std::string str, void *src); + int set_name (string str, void *src); + long order_key (const char* name) const; void set_order_key (const char* name, long n); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 6c791ca431..ac30cb4702 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2695,3 +2695,20 @@ Route::save_as_template (const string& path, const string& name) tree.set_root (&node); return tree.write (path.c_str()); } + +int +Route::set_name (string str, void* src) +{ + int ret; + + if ((ret = IO::set_name (str, src)) == 0) { + if (_control_outs) { + string coutname = _name; + coutname += _("[control]"); + cerr << _name << " reset control outs to " << coutname << endl; + return _control_outs->set_name (coutname, src); + } + return 0; + } + return ret; +} diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 91bc623f84..74be7def1d 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -207,7 +207,7 @@ Track::set_name (string str, void *src) /* save state so that the statefile fully reflects any filename changes */ - if ((ret = IO::set_name (str, src)) == 0) { + if ((ret = Route::set_name (str, src)) == 0) { _session.save_state (""); } return ret; |