[Companion] HardwarePanel - fix saving of Bluetooth Mode selection (and related Qt warning), introduced in a87722b.
This commit is contained in:
@@ -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)) {
|
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);
|
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
|
||||||
}
|
}
|
||||||
else {
|
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()
|
void HardwarePanel::setValues()
|
||||||
{
|
{
|
||||||
ui->txVoltageCalibration->setValue((double)generalSettings.txVoltageCalibration/10);
|
ui->txVoltageCalibration->setValue((double)generalSettings.txVoltageCalibration/10);
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ class HardwarePanel : public GeneralPanel
|
|||||||
|
|
||||||
void on_txCurrentCalibration_editingFinished();
|
void on_txCurrentCalibration_editingFinished();
|
||||||
void on_txVoltageCalibration_editingFinished();
|
void on_txVoltageCalibration_editingFinished();
|
||||||
void on_bluetoothMode_stateChanged(int);
|
|
||||||
void on_filterEnable_stateChanged();
|
void on_filterEnable_stateChanged();
|
||||||
|
|
||||||
void on_serialPortMode_currentIndexChanged(int index);
|
void on_serialPortMode_currentIndexChanged(int index);
|
||||||
|
|||||||
@@ -1099,7 +1099,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="bluetoothMode">
|
<widget class="AutoComboBox" name="bluetoothMode">
|
||||||
<property name="text" stdset="0">
|
<property name="text" stdset="0">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user