mirror of https://github.com/EspoTek/Labrador.git
Range Dialog Preference saved between launches
This commit is contained in:
parent
e52869554e
commit
7164791e1b
|
@ -1240,6 +1240,12 @@ void MainWindow::readSettingsFile(){
|
|||
double calibrate_gain_ch1 = settings->value("CalibrateGainCH1", R4/(R3+R4)).toDouble();
|
||||
double calibrate_gain_ch2 = settings->value("CalibrateGainCH2", R4/(R3+R4)).toDouble();
|
||||
psu_voltage_calibration_offset = settings->value("CalibratePsu", 0).toDouble();
|
||||
if (settings->value("ShowRangeDialog").toBool())
|
||||
{
|
||||
qDebug() << "ShowRangeDialog setting true";
|
||||
ui->actionShow_Range_Dialog_on_Main_Page->setChecked(true);
|
||||
on_actionShow_Range_Dialog_on_Main_Page_triggered(true);
|
||||
}
|
||||
|
||||
daq_num_to_average = settings->value("daq_defaultAverage", 1).toInt();
|
||||
daq_max_file_size = settings->value("daq_defaultFileSize", 2048000000).toULongLong();
|
||||
|
@ -2335,6 +2341,7 @@ void MainWindow::on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked)
|
|||
qDebug() << "on_actionShow_Range_Dialog_on_Main_Page_triggered" << checked;
|
||||
if (checked)
|
||||
{
|
||||
settings->setValue("ShowRangeDialog", true);
|
||||
scopeRangeSwitch = new scopeRangeEnterDialog(nullptr, false, ui->controller_iso->display.topRange, ui->controller_iso->display.botRange, ui->controller_iso->display.window, ui->controller_iso->display.delay);
|
||||
scopeRangeSwitch->setWindowFlags(Qt::Widget);
|
||||
#ifndef PLATFORM_ANDROID
|
||||
|
@ -2352,6 +2359,7 @@ void MainWindow::on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked)
|
|||
}
|
||||
else
|
||||
{
|
||||
settings->setValue("ShowRangeDialog", false);
|
||||
delete scopeRangeSwitch;
|
||||
scopeRangeSwitch = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue