summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-12-21 01:51:07 +0100
committerRobin Gareus <robin@gareus.org>2017-12-21 02:30:01 +0100
commitc0d333ba9cdf7ec4039ad34eb765e6a077430eb7 (patch)
tree7f8a19a07c452c84a70174856b34bacca8804b62 /libs
parent0d72f37318116b7e1305ce0674a36216aded6c23 (diff)
FP8/16 subscribe to panner changes (add/remove channel)
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/faderport8/faderport8.cc12
1 files changed, 12 insertions, 0 deletions
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<Stripable> (*s), _1), this);
+ if (boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(*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<Stripable> (*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<Stripable> 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: