diff options
author | Robin Gareus <robin@gareus.org> | 2013-08-03 02:46:08 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-08-03 02:46:08 +0200 |
commit | 9d63cfcab5537b8b82cc28b54f133fbed8773c7d (patch) | |
tree | 6f32c06ed31f3d2ab25c90283450c0810619c8bb /gtk2_ardour/port_group.cc | |
parent | 0eb5b7d1aba607bf9f3b0ac15d8916280f571a22 (diff) |
fix "other" port-group tab
Separate port-bundles for each jack client in the connection manager.
Previously, apps were only listed as separate bundles if the
ports were gathered at different times. ie one app shows up after
the other (and if no complete re-scan was triggered)
Fixes issue reported by Fons Adriaensen.
Diffstat (limited to 'gtk2_ardour/port_group.cc')
-rw-r--r-- | gtk2_ardour/port_group.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index 925bebc307..531a5cf2c4 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -574,8 +574,22 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp } for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) { - if (!extra_other[*i].empty()) { - boost::shared_ptr<Bundle> b = make_bundle_from_ports (extra_other[*i], *i, inputs); + if (extra_other[*i].empty()) continue; + std::string cp; + std::vector<std::string> nb; + for (uint32_t j = 0; j < extra_other[*i].size(); ++j) { + std::string nn = extra_other[*i][j]; + std::string pf = nn.substr (0, nn.find_first_of (":") + 1); + if (pf != cp && !nb.empty()) { + boost::shared_ptr<Bundle> b = make_bundle_from_ports (nb, *i, inputs); + other->add_bundle (b); + nb.clear(); + } + cp = pf; + nb.push_back(extra_other[*i][j]); + } + if (!nb.empty()) { + boost::shared_ptr<Bundle> b = make_bundle_from_ports (nb, *i, inputs); other->add_bundle (b); } } |