diff options
author | Carl Hetherington <carl@carlh.net> | 2010-01-15 00:26:47 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-01-15 00:26:47 +0000 |
commit | bbb65d07d33160366533d9f2390f3f8d56fcb8e1 (patch) | |
tree | bb1c8260091653d30a1a2e3984b95aa1a78e88fb /libs/ardour/route_group.cc | |
parent | bd3f48aaa7cd07b830f92af49beef5a4e2b71985 (diff) |
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
Diffstat (limited to 'libs/ardour/route_group.cc')
-rw-r--r-- | libs/ardour/route_group.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index f1a3a67a89..e1d43f4cd6 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -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 (); |