- routes.push_back (r);
- r->GoingAway.connect (*this, boost::bind (&RouteRedirectSelection::removed, this, boost::weak_ptr<Route>(r)), gui_context());
- RoutesChanged();
+ if (routes.insert (r).second) {
+ r->set_selected (true);
+
+ MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
+
+ if (ms) {
+ ms->CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RouteProcessorSelection::remove, this, _1), gui_context());
+ }
+
+ if (!_no_route_change_signal) {
+ RoutesChanged();
+ }
+ }