소스 검색

fixed reading settings to bool iso int where applicable

fiffty-50 4 년 전
부모
커밋
f432867e43
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      src/gui/dialogues/newflight.cpp

+ 7 - 7
src/gui/dialogues/newflight.cpp

@@ -391,16 +391,16 @@ void NewFlight::readSettings()
 
     ui->FunctionComboBox->setCurrentText(Settings::read("NewFlight/FunctionComboBox").toString());
     ui->ApproachComboBox->setCurrentText(Settings::read("NewFlight/ApproachComboBox").toString());
-    ui->PilotFlyingCheckBox->setChecked(Settings::read("NewFlight/PilotFlyingCheckBox").toInt());
-    ui->PilotMonitoringCheckBox->setChecked(Settings::read("NewFlight/PilotMonitoringCheckBox").toInt());
+    ui->PilotFlyingCheckBox->setChecked(Settings::read("NewFlight/PilotFlyingCheckBox").toBool());
+    ui->PilotMonitoringCheckBox->setChecked(Settings::read("NewFlight/PilotMonitoringCheckBox").toBool());
     ui->TakeoffSpinBox->setValue(Settings::read("NewFlight/TakeoffSpinBox").toInt());
-    ui->TakeoffCheckBox->setChecked(Settings::read("NewFlight/TakeoffCheckBox").toInt());
+    ui->TakeoffCheckBox->setChecked(Settings::read("NewFlight/TakeoffCheckBox").toBool());
     ui->LandingSpinBox->setValue(Settings::read("NewFlight/LandingSpinBox").toInt());
-    ui->LandingCheckBox->setChecked(Settings::read("NewFlight/LandingCheckBox").toInt());
+    ui->LandingCheckBox->setChecked(Settings::read("NewFlight/LandingCheckBox").toBool());
     ui->AutolandSpinBox->setValue(Settings::read("NewFlight/AutolandSpinBox").toInt());
-    ui->AutolandCheckBox->setChecked(Settings::read("NewFlight/AutolandCheckBox").toInt());
-    ui->IfrCheckBox->setChecked(Settings::read("NewFlight/IfrCheckBox").toInt());
-    ui->VfrCheckBox->setChecked(Settings::read("NewFlight/VfrCheckBox").toInt());
+    ui->AutolandCheckBox->setChecked(Settings::read("NewFlight/AutolandCheckBox").toBool());
+    ui->IfrCheckBox->setChecked(Settings::read("NewFlight/IfrCheckBox").toBool());
+    ui->VfrCheckBox->setChecked(Settings::read("NewFlight/VfrCheckBox").toBool());
     ui->FlightNumberLineEdit->setText(Settings::read("flightlogging/flightnumberPrefix").toString());
 
     if(Settings::read("NewFlight/FunctionComboBox").toString() == "PIC"){