-
- switch (b) {
- case 1:
- _body->highlight_associated_channels (_matrix->column_index(), i);
- break;
- case 3:
- _matrix->popup_channel_context_menu (_matrix->column_index(), i, t);
- break;
+
+ uint32_t const bh = _longest_channel_name * sin (angle ()) + _text_height / cos (angle ());
+
+ if (
+ (_matrix->arrangement() == PortMatrix::LEFT_TO_BOTTOM && y > bh) ||
+ (_matrix->arrangement() == PortMatrix::TOP_TO_RIGHT && y < (_height - bh))
+ ) {
+
+ /* if the mouse is over a bundle name, highlight all channels in the bundle */
+
+ list<PortMatrixNode> n;
+
+ 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));
+ }
+
+ _body->set_mouseover (n);
+
+ } else {
+
+ _body->set_mouseover (PortMatrixNode (ARDOUR::BundleChannel (), w));