summaryrefslogtreecommitdiffstats
path: root/src/preferences
diff options
context:
space:
mode:
authorronso0 <ronso0@mixxx.org>2021-06-16 04:26:50 +0200
committerronso0 <ronso0@mixxx.org>2021-06-16 04:26:50 +0200
commit7f41eec3fa742c05063e6a9b4811e6fafa127624 (patch)
treef41c098c14d53ac043b08d9070df3937a87960be /src/preferences
parent7585ce91606b618ee575a78248a9bf4a4a649046 (diff)
Pref > Deck: fix enable/disable pitch bend widgets
Diffstat (limited to 'src/preferences')
-rw-r--r--src/preferences/dialog/dlgprefdeck.cpp41
1 files changed, 26 insertions, 15 deletions
diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp
index 23fb53a23f..00344868d6 100644
--- a/src/preferences/dialog/dlgprefdeck.cpp
+++ b/src/preferences/dialog/dlgprefdeck.cpp
@@ -342,23 +342,9 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent,
MIXXX_MANUAL_CUE_MODES_URL));
//
- // Ramping Temporary Rate Change configuration
+ // Speed / Pitch reset configuration
//
- // Set Ramp Rate On or Off
- connect(radioButtonRateRampModeLinear,
- &QRadioButton::toggled,
- this,
- &DlgPrefDeck::slotRateRampingModeLinearButton);
- m_bRateRamping = static_cast<RateControl::RampMode>(
- m_pConfig->getValue(ConfigKey("[Controls]", "RateRamp"),
- static_cast<int>(kDefaultRampingMode)));
- if (m_bRateRamping == RateControl::RampMode::Linear) {
- radioButtonRateRampModeLinear->setChecked(true);
- } else {
- radioButtonRateRampModeStepping->setChecked(true);
- }
-
// Update "reset speed" and "reset pitch" check boxes
// TODO: All defaults should only be set in slotResetToDefaults.
int configSPAutoReset = m_pConfig->getValue<int>(
@@ -376,6 +362,10 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent,
connect(checkBoxResetSpeed, &QCheckBox::toggled, this, &DlgPrefDeck::slotUpdateSpeedAutoReset);
connect(checkBoxResetPitch, &QCheckBox::toggled, this, &DlgPrefDeck::slotUpdatePitchAutoReset);
+ //
+ // Ramping Temporary Rate Change configuration
+ //
+
connect(SliderRateRampSensitivity,
QOverload<int>::of(&QAbstractSlider::valueChanged),
SpinBoxRateRampSensitivity,
@@ -384,6 +374,7 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent,
QOverload<int>::of(&QSpinBox::valueChanged),
SliderRateRampSensitivity,
QOverload<int>::of(&QAbstractSlider::setValue));
+ // Enable/disable permanent rate spinboxes when smooth ramping is selected
connect(radioButtonRateRampModeLinear,
&QRadioButton::toggled,
labelSpeedRampSensitivity,
@@ -396,6 +387,7 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent,
&QRadioButton::toggled,
SpinBoxRateRampSensitivity,
&QWidget::setEnabled);
+ // Enable/disable temporary rate spinboxes when abrupt ramping is selected
connect(radioButtonRateRampModeStepping,
&QRadioButton::toggled,
labelSpeedTemporary,
@@ -408,6 +400,19 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent,
&QRadioButton::toggled,
spinBoxTemporaryRateFine,
&QWidget::setEnabled);
+ // Set Ramp Rate On or Off
+ connect(radioButtonRateRampModeLinear,
+ &QRadioButton::toggled,
+ this,
+ &DlgPrefDeck::slotRateRampingModeLinearButton);
+ m_bRateRamping = static_cast<RateControl::RampMode>(
+ m_pConfig->getValue(ConfigKey("[Controls]", "RateRamp"),
+ static_cast<int>(kDefaultRampingMode)));
+ if (m_bRateRamping == RateControl::RampMode::Linear) {
+ radioButtonRateRampModeLinear->setChecked(true);
+ } else {
+ radioButtonRateRampModeStepping->setChecked(true);
+ }
slotUpdate();
}
@@ -480,6 +485,12 @@ void DlgPrefDeck::slotUpdate() {
checkBoxResetSpeed->setChecked(false);
}
+ if (m_bRateRamping == RateControl::RampMode::Linear) {
+ radioButtonRateRampModeLinear->setChecked(true);
+ } else {
+ radioButtonRateRampModeStepping->setChecked(true);
+ }
+
SliderRateRampSensitivity->setValue(
m_pConfig->getValue(ConfigKey("[Controls]", "RateRampSensitivity"),
kDefaultRateRampSensitivity));