- // not used by Ardour, just mixbus so in Ardour always true
- clear_strip_with_id ("/select/send_enable", nsends + 1, 1);
+ boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (_strip);
+ if (!r) {
+ // should never get here
+ clear_strip_with_id ("/select/send_enable", nsends + 1, 0);
+ }
+ boost::shared_ptr<Send> snd = boost::dynamic_pointer_cast<Send> (r->nth_send(nsends));
+ if (snd) {
+ boost::shared_ptr<Processor> proc = boost::dynamic_pointer_cast<Processor> (snd);
+ proc->ActiveChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_enable, this, X_("/select/send_enable"), nsends + 1, proc), OSC::instance());
+ clear_strip_with_id ("/select/send_enable", nsends + 1, proc->enabled());
+ }