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_column_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_column_labels.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_column_labels.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/port_matrix_column_labels.cc b/gtk2_ardour/port_matrix_column_labels.cc index 1cdf510c59..99dc369f0a 100644 --- a/gtk2_ardour/port_matrix_column_labels.cc +++ b/gtk2_ardour/port_matrix_column_labels.cc @@ -156,7 +156,11 @@ PortMatrixColumnLabels::render (cairo_t* cr) for (uint32_t j = 0; j < C; ++j) { Gdk::Color c = (*i)->has_colour ? (*i)->colour : get_a_bundle_colour (N); - render_channel_name (cr, background_colour (), c, x, 0, 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, x, 0, bc); x += grid_spacing(); } @@ -487,9 +491,11 @@ PortMatrixColumnLabels::motion (double x, double y) list<PortMatrixNode> n; - uint32_t const N = _matrix->count_of_our_type (w.bundle->nchannels ()); - - for (uint32_t i = 0; i < N; ++i) { + for (uint32_t i = 0; i < w.bundle->nchannels().n_total(); ++i) { + if (!_matrix->should_show (w.bundle->channel_type (i))) { + continue; + } + ARDOUR::BundleChannel const bc (w.bundle, i); n.push_back (PortMatrixNode (ARDOUR::BundleChannel (), bc)); } |