From ce35e913d0e7f059dc15e9677ff6b3c5287ff487 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 8 Apr 2011 16:48:34 +0000 Subject: [PATCH] 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 --- libs/ardour/route.cc | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index f5fd4a682c..04100f6203 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -3271,22 +3271,20 @@ Route::set_name (const string& str) ret = (_input->set_name(name) && _output->set_name(name)); if (ret) { - - 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 iop = boost::dynamic_pointer_cast (*i); - - if (iop && (iop->output() || iop->input())) { - if (!iop->set_name (name)) { - ret = false; - } + /* 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). + */ + + 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;