mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 16:37:44 +01:00
when renaming a port, remove the backend's port map entry based on the *old* name (not the new one)
This commit is contained in:
parent
3188fe00aa
commit
dd94d43c46
1 changed files with 2 additions and 1 deletions
|
|
@ -451,6 +451,7 @@ PortEngineSharedImpl::set_port_name (PortEngine::PortHandle port_handle, const s
|
|||
return -1;
|
||||
}
|
||||
|
||||
const std::string old_name = port->name();
|
||||
int ret = port->set_name (newname);
|
||||
|
||||
if (ret == 0) {
|
||||
|
|
@ -458,7 +459,7 @@ PortEngineSharedImpl::set_port_name (PortEngine::PortHandle port_handle, const s
|
|||
RCUWriter<PortMap> map_writer (_portmap);
|
||||
boost::shared_ptr<PortMap> pm = map_writer.get_copy ();
|
||||
|
||||
pm->erase (port->name());
|
||||
pm->erase (old_name);
|
||||
pm->insert (make_pair (newname, port));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue