diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-08-24 14:17:14 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-08-24 14:17:14 -0400 |
commit | a9ae875b7168e761867941c1bd0158e1b9e96713 (patch) | |
tree | 328ec5a6cbfd3ac2870c0cadfb7733f4881991e4 /libs/ardour | |
parent | 92b3d40e3d489981394b06b15b347f6076ebf01a (diff) |
a couple more explanatory comments, and rename a variable to be more clear
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/selection.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libs/ardour/selection.cc b/libs/ardour/selection.cc index 8cab4b1766..5bd186510a 100644 --- a/libs/ardour/selection.cc +++ b/libs/ardour/selection.cc @@ -120,6 +120,8 @@ CoreSelection::select_adjacent_stripable (bool mixer_order, bool routes_only, r = boost::dynamic_pointer_cast<Route> (*s); + /* monitor is never selectable anywhere. for now, anyway */ + if ((!routes_only || r) && !(*s)->is_monitor()) { if (select_stripable_and_maybe_group (*s, true, routes_only, 0)) { return; @@ -142,24 +144,32 @@ CoreSelection::select_prev_stripable (bool mixer_order, bool routes_only) bool -CoreSelection::select_stripable_and_maybe_group (boost::shared_ptr<Stripable> s, bool with_group, bool routes_only, RouteGroup* group) +CoreSelection::select_stripable_and_maybe_group (boost::shared_ptr<Stripable> s, bool with_group, bool routes_only, RouteGroup* not_allowed_in_group) { boost::shared_ptr<Route> r; StripableList sl; + /* no selection of hidden stripables (though they can be selected and + * then hidden + */ + if (s->is_hidden()) { return false; } if ((r = boost::dynamic_pointer_cast<Route> (s))) { + /* no selection of inactive routes, though they can be selected + * and made inactive. + */ + if (!r->active()) { return false; } if (with_group) { - if (!group || !r->route_group() || r->route_group() != group) { + if (!not_allowed_in_group || !r->route_group() || r->route_group() != not_allowed_in_group) { if (r->route_group() && r->route_group()->is_select()) { boost::shared_ptr<RouteList> rl = r->route_group()->route_list (); |