Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DlgPrefController: don't enable checkbox if controller is disabled #4244

Merged
merged 1 commit into from
Aug 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/controllers/dlgprefcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,14 @@ PresetInfo DlgPrefController::enumeratePresetsFromEnumerator(
}

void DlgPrefController::slotUpdate() {
// Check if the controller is open.
bool deviceOpen = m_pController->isOpen();
// Check/uncheck the "Enabled" box
m_ui.chkEnabledDevice->setChecked(deviceOpen);

enumeratePresets(m_pControllerManager->getConfiguredPresetFileForDevice(
m_pController->getName()));

// enumeratePresets will check the m_ui.chkEnabledDevice checkbox if
// there is a valid mapping saved in the mixxx.cfg file. However, the
// checkbox should only be checked if the device is currently enabled.
m_ui.chkEnabledDevice->setChecked(m_pController->isOpen());

// If the controller is not mappable, disable the input and output mapping
// sections and the learning wizard button.
bool isMappable = m_pController->isMappable();
Expand Down