13
0

rename only the main outs of a route when its name changes, not inserts or sends, which leads to port name collisions since the name gets shared with the route itself

git-svn-id: svn://localhost/ardour2/branches/3.0@9333 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-04-08 16:48:34 +00:00
parent 33cd347529
commit ce35e913d0

View File

@ -3271,24 +3271,22 @@ Route::set_name (const string& str)
ret = (_input->set_name(name) && _output->set_name(name));
if (ret) {
/* rename the main outs. Leave other IO processors
* with whatever name they already have, because its
* just fine as it is (it will not contain the route
* name if its a port insert, port send or port return).
*/
Glib::RWLock::ReaderLock lm (_processor_lock);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
/* rename all I/O processors that have inputs or outputs */
boost::shared_ptr<IOProcessor> iop = boost::dynamic_pointer_cast<IOProcessor> (*i);
if (iop && (iop->output() || iop->input())) {
if (!iop->set_name (name)) {
ret = false;
if (_main_outs) {
if (_main_outs->set_name (name)) {
/* XXX returning false here is stupid because
we already changed the route name.
*/
return false;
}
}
}
}
return ret;
}