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