13
0

Relent a bit and make adding a route to a group which already contains that group a no-op.

git-svn-id: svn://localhost/ardour2/branches/3.0@6490 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-01-15 00:26:47 +00:00
parent bd3f48aaa7
commit bbb65d07d3

View File

@ -68,10 +68,15 @@ RouteGroup::set_name (string str)
FlagsChanged (0); /* EMIT SIGNAL */
}
/** Add a route to a group. Adding a route which is already in the group is allowed; nothing will happen.
* @param r Route to add.
*/
int
RouteGroup::add (boost::shared_ptr<Route> r)
{
assert (find (routes->begin(), routes->end(), r) == routes->end ());
if (find (routes->begin(), routes->end(), r) != routes->end()) {
return 0;
}
r->leave_route_group ();