diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-25 22:07:36 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-25 22:07:36 -0500 |
commit | 64e90886b54fe0bed3d128670320f06c3aabb8a9 (patch) | |
tree | 5a134e3616e4856d76cf45fc82e62d3d99e6b325 /libs/ardour/route_group_member.cc | |
parent | 7b6142ed9920903321add8be961a8abe8d899fa4 (diff) |
fix/improve logic for InverseGroup
the route group is "inactive for predicate" if EITHER the
group itself is inactive, or the predicate returns false.
Diffstat (limited to 'libs/ardour/route_group_member.cc')
-rw-r--r-- | libs/ardour/route_group_member.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/route_group_member.cc b/libs/ardour/route_group_member.cc index d0701f57da..9ca94bfb2b 100644 --- a/libs/ardour/route_group_member.cc +++ b/libs/ardour/route_group_member.cc @@ -39,9 +39,10 @@ RouteGroupMember::set_route_group (RouteGroup *rg) bool RouteGroupMember::use_group (PBD::Controllable::GroupControlDisposition gcd, bool (RouteGroup::*predicate)(void) const) const { + bool active_for_predicate = _route_group && (_route_group->*predicate)() && _route_group->is_active(); + return (gcd != PBD::Controllable::NoGroup) && - _route_group && - (_route_group->*predicate)() && - (((_route_group->is_active()) && (gcd != PBD::Controllable::InverseGroup)) || - ((!_route_group->is_active()) && (gcd == PBD::Controllable::InverseGroup))); + _route_group && + ((active_for_predicate && (gcd != PBD::Controllable::InverseGroup)) || + (!active_for_predicate && (gcd == PBD::Controllable::InverseGroup))); } |