13
0

Include Tracks and Busses in connection dropdown #8636

This commit is contained in:
Robin Gareus 2021-03-25 01:54:48 +01:00
parent 16abbd6254
commit ff1083128b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -235,12 +235,33 @@ IOButton::button_press (GdkEventButton* ev)
RouteList copy = *routes;
copy.sort (RouteCompareByName ());
if (_input) {
/* other routes outputs */
for (ARDOUR::RouteList::const_iterator i = copy.begin (); i != copy.end (); ++i) {
if ((*i)->is_foldbackbus ()) {
continue;
}
if (_route->feeds_according_to_graph (*i)) {
/* do not offer connections that would cause feedback */
continue;
}
maybe_add_bundle_to_menu ((*i)->output ()->bundle (), current);
}
if (!_input) {
} else {
DataType intended_type = guess_main_type ();
/* other routes inputs */
for (ARDOUR::RouteList::const_iterator i = copy.begin(); i != copy.end(); ++i) {
if ((*i)->is_foldbackbus ()) {
continue;
}
if ((*i)->feeds_according_to_graph (_route)) {
/* do not offer connections that would cause feedback */
continue;
}
maybe_add_bundle_to_menu ((*i)->input()->bundle(), current, intended_type);
}
/* then try adding user output bundles, often labeled/grouped physical inputs */
for (ARDOUR::BundleList::iterator i = b->begin (); i != b->end (); ++i) {
if (boost::dynamic_pointer_cast<UserBundle> (*i)) {