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)
{
+ if (find (routes->begin(), routes->end(), r) != routes->end()) {
+ return 0;
+ }
+
r->leave_route_group ();
routes->push_back (r);
r->join_route_group (this);
- r->GoingAway.connect_same_thread (*this, boost::bind (&RouteGroup::remove_when_going_away, this, boost::weak_ptr<Route> (r)));
+ r->DropReferences.connect_same_thread (*this, boost::bind (&RouteGroup::remove_when_going_away, this, boost::weak_ptr<Route> (r)));
_session.set_dirty ();
changed (); /* EMIT SIGNAL */