13
0

rename Controllable::WholeGroup => InverseGroup to reflect real intent.

Add logic to RouteGroupMember::use_group() to implement the real intent of InverseGroup
This commit is contained in:
Paul Davis 2016-01-21 12:04:20 -05:00
parent 9e5b7db89f
commit 23794eca5b
5 changed files with 11 additions and 10 deletions

View File

@ -426,7 +426,7 @@ RouteUI::mute_press (GdkEventButton* ev)
} }
DisplaySuspender ds; DisplaySuspender ds;
_session->set_mute (rl, !_route->muted(), Session::rt_cleanup, Controllable::WholeGroup); _session->set_mute (rl, !_route->muted(), Session::rt_cleanup, Controllable::InverseGroup);
} }
} else { } else {
@ -620,9 +620,9 @@ RouteUI::solo_press(GdkEventButton* ev)
DisplaySuspender ds; DisplaySuspender ds;
if (Config->get_solo_control_is_listen_control()) { if (Config->get_solo_control_is_listen_control()) {
_session->set_listen (rl, !_route->listening_via_monitor(), Session::rt_cleanup, Controllable::WholeGroup); _session->set_listen (rl, !_route->listening_via_monitor(), Session::rt_cleanup, Controllable::InverseGroup);
} else { } else {
_session->set_solo (rl, !_route->self_soloed(), Session::rt_cleanup, Controllable::WholeGroup); _session->set_solo (rl, !_route->self_soloed(), Session::rt_cleanup, Controllable::InverseGroup);
} }
} }
@ -735,7 +735,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
} }
DisplaySuspender ds; DisplaySuspender ds;
_session->set_record_enabled (rl, !_route->record_enabled(), Session::rt_cleanup, Controllable::WholeGroup); _session->set_record_enabled (rl, !_route->record_enabled(), Session::rt_cleanup, Controllable::InverseGroup);
} }
} else if (Keyboard::is_context_menu_event (ev)) { } else if (Keyboard::is_context_menu_event (ev)) {

View File

@ -40,7 +40,8 @@ bool
RouteGroupMember::use_group (PBD::Controllable::GroupControlDisposition gcd, bool (RouteGroup::*predicate)(void) const) const RouteGroupMember::use_group (PBD::Controllable::GroupControlDisposition gcd, bool (RouteGroup::*predicate)(void) const) const
{ {
return (gcd != PBD::Controllable::NoGroup) && return (gcd != PBD::Controllable::NoGroup) &&
(_route_group && _route_group &&
((gcd == PBD::Controllable::WholeGroup) || (_route_group->*predicate)() &&
(_route_group->is_active() && (_route_group->*predicate)()))); (((_route_group->is_active()) && (gcd != PBD::Controllable::InverseGroup)) ||
((!_route_group->is_active()) && (gcd == PBD::Controllable::InverseGroup)));
} }

View File

@ -3673,7 +3673,7 @@ Session::route_solo_changed (bool self_solo_change, Controllable::GroupControlDi
* The first argument to the signal that this method is connected to is the * The first argument to the signal that this method is connected to is the
* GroupControlDisposition value that was used to change solo. * GroupControlDisposition value that was used to change solo.
* *
* If the solo change was done with group semantics (either WholeGroup * If the solo change was done with group semantics (either InverseGroup
* (force the entire group to change even if the group shared solo is * (force the entire group to change even if the group shared solo is
* disabled) or UseGroup (use the group, which may or may not have the * disabled) or UseGroup (use the group, which may or may not have the
* shared solo property enabled)) then as we propagate the change to * shared solo property enabled)) then as we propagate the change to

View File

@ -41,7 +41,7 @@ setup_libpbd_enums ()
REGISTER_CLASS_ENUM (Controllable, GainLike); REGISTER_CLASS_ENUM (Controllable, GainLike);
REGISTER (controllable_flags); REGISTER (controllable_flags);
REGISTER_CLASS_ENUM (Controllable, WholeGroup); REGISTER_CLASS_ENUM (Controllable, InverseGroup);
REGISTER_CLASS_ENUM (Controllable, UseGroup); REGISTER_CLASS_ENUM (Controllable, UseGroup);
REGISTER_CLASS_ENUM (Controllable, NoGroup); REGISTER_CLASS_ENUM (Controllable, NoGroup);
REGISTER (controllable_group_disposition); REGISTER (controllable_group_disposition);

View File

@ -82,7 +82,7 @@ class LIBPBD_API Controllable : public PBD::StatefulDestructible {
*/ */
enum GroupControlDisposition { enum GroupControlDisposition {
WholeGroup, /* set all controls in the same "group" as this one */ InverseGroup, /* set all controls in the same "group" as this one */
NoGroup, /* set only this control */ NoGroup, /* set only this control */
UseGroup /* use group settings to decide which group controls are altered */ UseGroup /* use group settings to decide which group controls are altered */
}; };