GF enabled checkbox was missing (Fix #2558)

Number of GF in setup panel was not aligned with the radio
This commit is contained in:
Andre Bernet
2015-07-24 21:54:46 +02:00
parent 69cbb06470
commit 9b002b94ca
6 changed files with 25 additions and 2 deletions
+11
View File
@@ -517,6 +517,10 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
if (!firmware->getCapability(HasDisplayText)) {
ui->displayText->hide();
}
if (!firmware->getCapability(GlobalFunctions)) {
ui->gfEnabled->hide();
}
// Beep Center checkboxes
prevFocus = ui->trimsDisplay;
@@ -774,6 +778,7 @@ void SetupPanel::update()
ui->extendedLimits->setChecked(model->extendedLimits);
ui->extendedTrims->setChecked(model->extendedTrims);
ui->displayText->setChecked(model->displayChecklist);
ui->gfEnabled->setChecked(!model->noGlobalFunctions);
updateBeepCenter();
updateStartupSwitches();
@@ -915,6 +920,12 @@ void SetupPanel::on_displayText_toggled(bool checked)
emit modified();
}
void SetupPanel::on_gfEnabled_toggled(bool checked)
{
model->noGlobalFunctions = !checked;
emit modified();
}
void SetupPanel::on_throttleTrim_toggled(bool checked)
{
model->thrTrim = checked;