From 9e8209ad738962f14aa3ced95bdd365713cd2aa3 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 18 Oct 2021 11:09:27 -0500 Subject: [PATCH] EffectChain: name ControlObjects consistently with chain_preset --- src/effects/effectchain.cpp | 20 +++++++++++++------- src/effects/effectchain.h | 4 ++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/effects/effectchain.cpp b/src/effects/effectchain.cpp index 607724b57e0..b4ed218fceb 100644 --- a/src/effects/effectchain.cpp +++ b/src/effects/effectchain.cpp @@ -101,26 +101,32 @@ EffectChain::EffectChain(const QString& group, &EffectChain::slotControlLoadedChainPresetRequest); m_pControlNextChainPreset = std::make_unique( - ConfigKey(m_group, "next_chain")); + ConfigKey(m_group, "next_chain_preset")); connect(m_pControlNextChainPreset.get(), &ControlObject::valueChanged, this, &EffectChain::slotControlNextChainPreset); + ControlDoublePrivate::insertAlias(ConfigKey(m_group, "next_chain"), + ConfigKey(m_group, "next_chain_preset")); m_pControlPrevChainPreset = std::make_unique( - ConfigKey(m_group, "prev_chain")); + ConfigKey(m_group, "prev_chain_preset")); connect(m_pControlPrevChainPreset.get(), &ControlObject::valueChanged, this, &EffectChain::slotControlPrevChainPreset); + ControlDoublePrivate::insertAlias(ConfigKey(m_group, "prev_chain"), + ConfigKey(m_group, "prev_chain_preset")); // Ignoring no-ops is important since this is for +/- tickers. - m_pControlChainSelector = std::make_unique( - ConfigKey(m_group, "chain_selector"), false); - connect(m_pControlChainSelector.get(), + m_pControlChainPresetSelector = std::make_unique( + ConfigKey(m_group, "chain_preset_selector"), false); + connect(m_pControlChainPresetSelector.get(), &ControlObject::valueChanged, this, - &EffectChain::slotControlChainSelector); + &EffectChain::slotControlChainPresetSelector); + ControlDoublePrivate::insertAlias(ConfigKey(m_group, "chain_selector"), + ConfigKey(m_group, "chain_preset_preset")); // ControlObjects for skin <-> controller mapping interaction. // Refer to comment in header for full explanation. @@ -316,7 +322,7 @@ void EffectChain::slotControlChainSuperParameter(double v, bool force) { } } -void EffectChain::slotControlChainSelector(double value) { +void EffectChain::slotControlChainPresetSelector(double value) { int index = presetIndex(); if (value > 0) { index++; diff --git a/src/effects/effectchain.h b/src/effects/effectchain.h index 8e0c9e6a7b8..72eb472b1e7 100644 --- a/src/effects/effectchain.h +++ b/src/effects/effectchain.h @@ -116,7 +116,7 @@ class EffectChain : public QObject { private slots: void slotControlLoadedChainPresetRequest(double value); - void slotControlChainSelector(double value); + void slotControlChainPresetSelector(double value); void slotControlNextChainPreset(double value); void slotControlPrevChainPreset(double value); void slotChannelStatusChanged(double value, const ChannelHandleAndGroup& handleGroup); @@ -136,7 +136,7 @@ class EffectChain : public QObject { std::unique_ptr m_pControlChainEnabled; std::unique_ptr m_pControlChainMixMode; std::unique_ptr m_pControlLoadedChainPreset; - std::unique_ptr m_pControlChainSelector; + std::unique_ptr m_pControlChainPresetSelector; std::unique_ptr m_pControlNextChainPreset; std::unique_ptr m_pControlPrevChainPreset;