Skip to content

Commit

Permalink
Disable firmware overrides UI when override checkbox isn't checked
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiaholmquist committed Mar 27, 2022
1 parent 5ca8728 commit 02b859a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/frontend/qt_sdl/FirmwareSettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ FirmwareSettingsDialog::FirmwareSettingsDialog(QWidget* parent) : QDialog(parent

ui->txtMAC->setText(QString::fromStdString(Config::FirmwareMAC));
ui->cbRandomizeMAC->setChecked(Config::RandomizeMAC);

on_overrideFirmwareBox_toggled();
on_cbRandomizeMAC_toggled();
}

Expand Down Expand Up @@ -202,6 +204,13 @@ void FirmwareSettingsDialog::on_cbxBirthdayMonth_currentIndexChanged(int idx)
}
}

void FirmwareSettingsDialog::on_overrideFirmwareBox_toggled()
{
bool disable = !ui->overrideFirmwareBox->isChecked();
ui->grpUserSettings->setDisabled(disable);
ui->grpWifiSettings->setDisabled(disable);
}

void FirmwareSettingsDialog::on_cbRandomizeMAC_toggled()
{
bool disable = ui->cbRandomizeMAC->isChecked();
Expand Down
1 change: 1 addition & 0 deletions src/frontend/qt_sdl/FirmwareSettingsDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private slots:
void done(int r);

void on_cbxBirthdayMonth_currentIndexChanged(int idx);
void on_overrideFirmwareBox_toggled();
void on_cbRandomizeMAC_toggled();

private:
Expand Down

0 comments on commit 02b859a

Please sign in to comment.