diff options
author | Carl Hetherington <carl@carlh.net> | 2011-11-08 02:10:56 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-11-08 02:10:56 +0000 |
commit | 19e97d1d64e8aa6d87d79d1f6332065992e5e027 (patch) | |
tree | 0b68797f47972b13929236b976035ae95f3c1011 /gtk2_ardour/port_matrix_row_labels.cc | |
parent | 9fa8238d9d4ebda14d60cc2256d721a0405b5fa0 (diff) |
Attempt to fix some confusions caused by bundles containing
different types of port; if we loop over N MIDI channels of
a mixed bundle, for example, we must convert 0...N to the
indices of the channels within the bundle. Also remove the
hack of creating new bundles to contain a subset of another
bundle's ports; if you do this, any signals emitted by the
other bundle are ignored. Should fix #4454.
git-svn-id: svn://localhost/ardour2/branches/3.0@10490 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_row_labels.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_row_labels.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk2_ardour/port_matrix_row_labels.cc b/gtk2_ardour/port_matrix_row_labels.cc index fcfeef13d0..38b2dde6a7 100644 --- a/gtk2_ardour/port_matrix_row_labels.cc +++ b/gtk2_ardour/port_matrix_row_labels.cc @@ -117,7 +117,12 @@ PortMatrixRowLabels::render (cairo_t* cr) uint32_t const N = _matrix->count_of_our_type ((*i)->bundle->nchannels()); for (uint32_t j = 0; j < N; ++j) { Gdk::Color c = (*i)->has_colour ? (*i)->colour : get_a_bundle_colour (M); - render_channel_name (cr, background_colour (), c, 0, y, ARDOUR::BundleChannel ((*i)->bundle, j)); + ARDOUR::BundleChannel bc ( + (*i)->bundle, + (*i)->bundle->type_channel_to_overall (_matrix->type (), j) + ); + + render_channel_name (cr, background_colour (), c, 0, y, bc); y += grid_spacing(); ++M; } @@ -334,8 +339,7 @@ PortMatrixRowLabels::motion (double x, double y) list<PortMatrixNode> n; for (uint32_t i = 0; i < w.bundle->nchannels().n_total(); ++i) { - - if (!_matrix->should_show (w.bundle->channel_type(i))) { + if (!_matrix->should_show (w.bundle->channel_type (i))) { continue; } |