summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_group.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-12-03 22:01:07 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-12-03 22:01:07 -0500
commitd237165e2178225b9f0b6a79055d808925baceae (patch)
treea0a6eb5abd176533c4b05cf650215743a2e0038f /gtk2_ardour/port_group.cc
parente82cc88c6ff45202bc100c93e722dabf3bc34a2f (diff)
do not show control surface bundles in non-MIDI port matrix.
This will stop being the right thing to do if anyone ever creates a control protocol that uses audio ports.
Diffstat (limited to 'gtk2_ardour/port_group.cc')
-rw-r--r--gtk2_ardour/port_group.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index f77c57f3f5..d02171a2b1 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -443,13 +443,20 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
/* our control surfaces */
- ControlProtocolManager& m = ControlProtocolManager::instance ();
- for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
- if ((*i)->protocol) {
- list<boost::shared_ptr<Bundle> > b = (*i)->protocol->bundles ();
- for (list<boost::shared_ptr<Bundle> >::iterator j = b.begin(); j != b.end(); ++j) {
- if ((*j)->ports_are_inputs() == inputs) {
- program->add_bundle (*j);
+ /* XXX assume for now that all control protocols with ports use
+ * MIDI. If anyone created a control protocol that used audio ports,
+ * this will break.
+ */
+
+ if ((type == DataType::MIDI || type == DataType::NIL)) {
+ ControlProtocolManager& m = ControlProtocolManager::instance ();
+ for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
+ if ((*i)->protocol) {
+ list<boost::shared_ptr<Bundle> > b = (*i)->protocol->bundles ();
+ for (list<boost::shared_ptr<Bundle> >::iterator j = b.begin(); j != b.end(); ++j) {
+ if ((*j)->ports_are_inputs() == inputs) {
+ program->add_bundle (*j);
+ }
}
}
}