diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-14 18:12:33 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-14 18:12:33 +0000 |
commit | d5a55c48f9027583a0355416e5ef73d6851ff67c (patch) | |
tree | c1b29516366b53fde77761065798b19c2656309c /gtk2_ardour/port_matrix_grid.cc | |
parent | ae5f278202c6a13637644a39c57fe34100cd7f6e (diff) |
Fix a few SNAFUs with the port matrix after recent changes.
git-svn-id: svn://localhost/ardour2/branches/3.0@9992 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_grid.cc | 16 |
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(); |