fix/improve logic for InverseGroup
the route group is "inactive for predicate" if EITHER the group itself is inactive, or the predicate returns false.
This commit is contained in:
parent
7b6142ed99
commit
64e90886b5
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user