- PortGroupList::List::const_iterator i = _matrix->rows()->begin();
-
- while (i != _matrix->rows()->end()) {
-
- uint32_t const gh = group_height (*i);
-
- if (y < gh) {
-
- /* it's in this group */
-
- PortGroup::BundleList const & bundles = (*i)->bundles ();
- for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {
-
- if (_matrix->show_only_bundles()) {
-
- if (y < row_height()) {
- return make_pair (*i, ARDOUR::BundleChannel (j->bundle, 0));
- } else {
- y -= row_height ();
- }
-
- } else {
-
- uint32_t const h = j->bundle->nchannels () * row_height ();
- if (y < h) {
- return make_pair (*i, ARDOUR::BundleChannel (j->bundle, y / row_height()));
- } else {
- y -= h;
- }
-
- }
+ p /= grid_spacing ();
+
+ PortGroup::BundleList const & bundles = group->bundles ();
+ for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {