From c0d333ba9cdf7ec4039ad34eb765e6a077430eb7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 21 Dec 2017 01:51:07 +0100 Subject: FP8/16 subscribe to panner changes (add/remove channel) --- libs/surfaces/faderport8/faderport8.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/surfaces/faderport8') diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index 8405174ad5..bbb85faac5 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -37,6 +37,7 @@ #include "ardour/debug.h" #include "ardour/midi_track.h" #include "ardour/midiport_manager.h" +#include "ardour/panner_shell.h" #include "ardour/plugin.h" #include "ardour/plugin_insert.h" #include "ardour/processor.h" @@ -996,6 +997,13 @@ FaderPort8::assign_stripables (bool select_only) (*s)->presentation_info ().PropertyChanged.connect (assigned_stripable_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::notify_stripable_property_changed, this, boost::weak_ptr (*s), _1), this); + if (boost::shared_ptr r = boost::dynamic_pointer_cast(*s)) { + if (r->panner_shell()) { + r->panner_shell()->Changed.connect (assigned_stripable_connections, MISSING_INVALIDATOR, + boost::bind (&FaderPort8::notify_stripable_property_changed, this, boost::weak_ptr (*s), PropertyChange()), this); + } + } + if (select_only) { /* used in send mode */ _ctrls.strip(id).set_text_line (3, (*s)->name (), true); @@ -1798,6 +1806,10 @@ FaderPort8::notify_stripable_property_changed (boost::weak_ptr ws, co _ctrls.strip(id).select_button ().set_color (s->presentation_info ().color()); } + if (what_changed.empty ()) { + _ctrls.strip(id).set_stripable (s, _ctrls.fader_mode() == ModePan); + } + if (what_changed.contains (Properties::name)) { switch (_ctrls.fader_mode ()) { case ModeSend: -- cgit v1.2.3