[Companion] HardwarePanel - fix saving of Bluetooth Mode selection (and related Qt warning), introduced in a87722b.

This commit is contained in:
Max Paperno
2018-06-02 21:10:51 -04:00
parent 40c5f0432c
commit cd8f006d31
3 changed files with 3 additions and 9 deletions
+2 -7
View File
@@ -158,7 +158,8 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
}
if (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_HORUS(board)) {
ui->bluetoothMode->setCurrentIndex(generalSettings.bluetoothMode);
ui->bluetoothMode->setAutoIndexes();
ui->bluetoothMode->setField(generalSettings.bluetoothMode, this);
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
}
else {
@@ -238,12 +239,6 @@ void HardwarePanel::on_txCurrentCalibration_editingFinished()
}
}
void HardwarePanel::on_bluetoothMode_stateChanged(int index)
{
generalSettings.bluetoothMode = index;
emit modified();
}
void HardwarePanel::setValues()
{
ui->txVoltageCalibration->setValue((double)generalSettings.txVoltageCalibration/10);