13
0

add and use UI config variable to decide whether selection-as-group is allowed

This commit is contained in:
Paul Davis 2023-07-26 18:30:59 -06:00
parent 5e37a320c0
commit acac9ac006
3 changed files with 14 additions and 5 deletions

View File

@ -757,10 +757,12 @@ GainMeterBase::amp_start_touch (int state)
{ {
assert (_route); assert (_route);
if (_route->is_selected() && (!_route->route_group() || !_route->route_group()->is_gain())) { if (UIConfiguration::instance().get_allow_selection_as_group()) {
_touch_control_group.reset (new GainControlGroup ()); if (_route->is_selected() && (!_route->route_group() || !_route->route_group()->is_gain())) {
_touch_control_group->set_mode (ControlGroup::Relative); _touch_control_group.reset (new GainControlGroup ());
_touch_control_group->fill_from_selection (_control->session().selection(), _control->parameter()); _touch_control_group->set_mode (ControlGroup::Relative);
_touch_control_group->fill_from_selection (_control->session().selection(), _control->parameter());
}
} }
_control->start_touch (timepos_t (_control->session().transport_sample())); _control->start_touch (timepos_t (_control->session().transport_sample()));

View File

@ -734,7 +734,9 @@ RouteUI::solo_press(GdkEventButton* ev)
std::shared_ptr<RouteList> rl (new RouteList); std::shared_ptr<RouteList> rl (new RouteList);
if (route() && (!route()->is_selected() || (route()->route_group() && route()->route_group()->is_solo()))) { if (!UIConfiguration::instance().get_allow_selection_as_group() &&
route() &&
(!route()->is_selected() || (route()->route_group() && route()->route_group()->is_solo()))) {
/* Not selected or part of a group that share solo, just start with this route */ /* Not selected or part of a group that share solo, just start with this route */
rl->push_back (route()); rl->push_back (route());
} else { } else {

View File

@ -163,3 +163,8 @@ UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, tempo_edit_behavior, "tempo-edit
/* these are visibility-type selections in the New Track dialog that we should make persistent for the user's choices */ /* these are visibility-type selections in the New Track dialog that we should make persistent for the user's choices */
UI_CONFIG_VARIABLE (bool, show_on_cue_page, "show-on-cue-page", true) UI_CONFIG_VARIABLE (bool, show_on_cue_page, "show-on-cue-page", true)
UI_CONFIG_VARIABLE (uint32_t, insert_at_position, "insert-at-position", 3) UI_CONFIG_VARIABLE (uint32_t, insert_at_position, "insert-at-position", 3)
#ifdef MIXBUS
UI_CONFIG_VARIABLE (bool, allow_selection_as_group, "allow-selection-as-group", true)
#else
UI_CONFIG_VARIABLE (bool, allow_selection_as_group, "allow-selection-as-group", false)
#endif