- PortGroupList::List::const_iterator i = groups->begin ();
-
- while (i != groups->end()) {
-
- uint32_t const gs = group_size (*i);
-
- if (p < gs) {
-
- /* it's in this group */
-
- if (!(*i)->visible()) {
- return make_pair (*i, ARDOUR::BundleChannel (boost::shared_ptr<ARDOUR::Bundle> (), 0));
- }
-
- PortGroup::BundleList const & bundles = (*i)->bundles ();
- for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {
-
- if (_matrix->show_only_bundles()) {
-
- if (p == 0) {
- return make_pair (*i, ARDOUR::BundleChannel (j->bundle, 0));
- } else {
- p -= 1;
- }
-
- } else {
-
- uint32_t const s = j->bundle->nchannels ();
- if (p < s) {
- return make_pair (*i, ARDOUR::BundleChannel (j->bundle, p));
- } else {
- p -= s;
- }
-
- }
+ PortGroup::BundleList const & bundles = group->bundles ();
+ for (PortGroup::BundleList::const_iterator j = bundles.begin(); j != bundles.end(); ++j) {