Suppress the mapping of unititialized controls in setup dialog

This commit is contained in:
Hoger Dehnhardt 2025-07-22 21:30:06 +02:00 committed by Robin Gareus
parent 280e30ade9
commit 361d0374dc
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 20 additions and 13 deletions

View file

@ -198,10 +198,10 @@ void
C1GUI::set_band_q_as_send ()
{
c1.band_q_as_send = !c1.band_q_as_send;
if(!c1.in_use()) {
if (!c1.in_use()) {
return;
}
c1.EQBandQBindingChange();
c1.EQBandQBindingChange (false);
}
void

View file

@ -921,7 +921,8 @@ Console1::map_eq ()
}
void
Console1::map_eq_mode (){
Console1::map_eq_mode ()
{
#ifdef MIXBUS
DEBUG_TRACE (DEBUG::Console1, "Enter map_eq_mode()\n");
if (!_current_stripable) {
@ -935,7 +936,7 @@ Console1::map_eq_mode (){
DEBUG_TRACE (DEBUG::Console1, string_compose ("map_eq_mode() - mode: %1\n", current_eq_mode));
if (current_eq_mode != strip_eq_mode) {
strip_eq_mode = current_eq_mode;
EQBandQBindingChange();
EQBandQBindingChange (true);
}
#endif
}
@ -1152,9 +1153,9 @@ Console1::map_comp_emph ()
}
}
void Console1::eqBandQChangeMapping()
void Console1::eqBandQChangeMapping (bool mapValues)
{
DEBUG_TRACE(DEBUG::Console1, string_compose("eqBandQChangeMapping(): band_q_as_send = %1, strip_eq_mode = %2\n", band_q_as_send, strip_eq_mode));
DEBUG_TRACE(DEBUG::Console1, string_compose("eqBandQChangeMapping(): band_q_as_send = %1, strip_eq_mode = %2, mapValues = %3 \n", band_q_as_send, strip_eq_mode, mapValues));
Encoder* lme = get_encoder (LOW_MID_SHAPE);
Encoder* hme = get_encoder (HIGH_MID_SHAPE);
switch_eq_q_dials = band_q_as_send || (strip_eq_mode == EQM_HARRISON );
@ -1168,14 +1169,20 @@ void Console1::eqBandQChangeMapping()
DEBUG_TRACE (DEBUG::Console1, "eqBandQChangeMapping() set harrison or send mode\n");
lme->set_action(std::function<void (uint32_t)> (std::bind (&Console1::mb_send_level, this, 10, _1)));
hme->set_action(std::function<void (uint32_t)> (std::bind (&Console1::mb_send_level, this, 11, _1)));
map_mb_send_level (10);
map_mb_send_level (11);
if (mapValues)
{
map_mb_send_level (10);
map_mb_send_level (11);
}
} else {
DEBUG_TRACE (DEBUG::Console1, "eqBandQChangeMapping() set ssl q mode\n");
lme->set_action(std::function<void (uint32_t)> (std::bind (&Console1::eq_band_q, this, 1, _1)));
hme->set_action(std::function<void (uint32_t)> (std::bind (&Console1::eq_band_q, this, 2, _1)));
map_eq_band_q (1);
map_eq_band_q (2);
if (mapValues)
{
map_eq_band_q (1);
map_eq_band_q (2);
}
}
}

View file

@ -257,7 +257,7 @@ Console1::connect_internal_signals ()
DEBUG_TRACE (DEBUG::Console1, "connect_internal_signals\n");
BankChange.connect (console1_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_bank, this), this);
ShiftChange.connect (console1_connections, MISSING_INVALIDATOR, std::bind (&Console1::map_shift, this, _1), this);
EQBandQBindingChange.connect (console1_connections, MISSING_INVALIDATOR, std::bind(&Console1::eqBandQChangeMapping, this), this);
EQBandQBindingChange.connect (console1_connections, MISSING_INVALIDATOR, std::bind(&Console1::eqBandQChangeMapping, this, _1), this);
PluginStateChange.connect(console1_connections, MISSING_INVALIDATOR, std::bind(&Console1::map_plugin_state, this, _1), this);
GotoView.connect (
console1_connections,

View file

@ -132,7 +132,7 @@ public:
PBD::Signal<void()> BankChange;
PBD::Signal<void(bool)> ShiftChange;
PBD::Signal<void(bool)> PluginStateChange;
PBD::Signal<void()> EQBandQBindingChange;
PBD::Signal<void(bool)> EQBandQBindingChange;
enum ControllerID
{
@ -652,7 +652,7 @@ private:
bool map_select_plugin (const int32_t plugin_index);
void eqBandQChangeMapping();
void eqBandQChangeMapping (bool mapValues);
using PluginMappingMap = std::map<std::string, PluginMapping>;
PluginMappingMap pluginMappingMap;