summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_grid.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r--gtk2_ardour/port_matrix_grid.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc
index b87f560984..fa394de8ef 100644
--- a/gtk2_ardour/port_matrix_grid.cc
+++ b/gtk2_ardour/port_matrix_grid.cc
@@ -217,15 +217,25 @@ PortMatrixGrid::render (cairo_t* cr)
y += grid_spacing();
}
- if ((*j)->bundle->nchannels() == ARDOUR::ChanCount::ZERO) {
+ if (_matrix->count_of_our_type ((*j)->bundle->nchannels()) == 0) {
+ /* the *j bundle has no channels of our type, so it will have a dummy
+ one which needs to be marked non-connectable.
+ */
draw_non_connectable_indicator (cr, x, y);
}
x += grid_spacing();
}
- if ((*i)->bundle->nchannels() == ARDOUR::ChanCount::ZERO) {
- draw_non_connectable_indicator (cr, x, y);
+ if (_matrix->count_of_our_type ((*i)->bundle->nchannels()) == 0) {
+ /* draw non-connectable indicators for the case where the *i bundle
+ has no channels of our type (and hence has 1 dummy channel)
+ */
+ y = by;
+ for (uint32_t l = 0; l < _matrix->count_of_our_type_min_1 ((*j)->bundle->nchannels()); ++l) {
+ draw_non_connectable_indicator (cr, x, y);
+ y += grid_spacing ();
+ }
}
by += _matrix->count_of_our_type_min_1 ((*j)->bundle->nchannels()) * grid_spacing();