- for (uint32_t j = 0; j < i->bundle->nchannels(); ++j) {
- bc[1 - dim] = ARDOUR::BundleChannel (i->bundle, j);
- if (_matrix->get_state (bc) == PortMatrixNode::ASSOCIATED) {
+ for (uint32_t j = 0; j < (*i)->bundle->nchannels().n_total(); ++j) {
+
+ if (!_matrix->should_show ((*i)->bundle->channel_type(j))) {
+ continue;
+ }
+
+ bc[1 - dim] = ARDOUR::BundleChannel ((*i)->bundle, j);
+
+ PortMatrixNode n;
+ n.row = bc[_matrix->row_index()];
+ n.column = bc[_matrix->column_index()];
+
+ if (_matrix->get_association(n) != PortMatrixNode::NOT_ASSOCIATED) {