+
+void
+PannerShell::set_linked_to_route (bool onoff)
+{
+ assert(_is_send);
+ if (onoff == _panlinked) {
+ return;
+ }
+
+ /* set _pannable-_has_state = true
+ * this way the panners will pick it up
+ * when it is re-created
+ */
+ if (pannable()) {
+ XMLNode state = pannable()->get_state();
+ pannable()->set_state(state, 3000);
+ }
+
+ _panlinked = onoff;
+
+ _force_reselect = true;
+ if (_panner) {
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
+ ChanCount in = _panner->in();
+ ChanCount out = _panner->out();
+ configure_io(in, out);
+ if (!_panlinked) {
+ pannable()->set_panner(_panner);
+ }
+ _session.set_dirty ();
+ }
+ PannableChanged();
+}