Almost all global settings wrapped in protective object to guarantee type safety and protect against tag spelling errors (I have found and corrected a lot of those!).
Joystick settings and burner configuration is not yet within the global object.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "logsdialog.h"
|
||||
#include "appdata.h"
|
||||
#include "ui_logsdialog.h"
|
||||
#include "qcustomplot.h"
|
||||
#if defined WIN32 || !defined __GNUC__
|
||||
@@ -38,8 +39,7 @@ logsDialog::logsDialog(QWidget *parent) :
|
||||
ui->customPlot->legend->setSelectedFont(legendFont);
|
||||
ui->customPlot->legend->setSelectable(QCPLegend::spItems); // legend box shall not be selectable, only legend items
|
||||
ui->customPlot->legend->setVisible(false);
|
||||
QSettings settings;
|
||||
QString Path=settings.value("gePath", "").toString();
|
||||
QString Path=glob.gePath();
|
||||
if (Path.isEmpty() || !QFile(Path).exists()) {
|
||||
ui->mapsButton->hide();
|
||||
}
|
||||
@@ -202,8 +202,7 @@ void logsDialog::on_mapsButton_clicked() {
|
||||
,F_F,F_F,F_F,F_F,I_F,I_F,I_F,I_F\
|
||||
,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F};
|
||||
|
||||
QSettings settings;
|
||||
QString gePath=settings.value("gePath", "").toString();
|
||||
QString gePath=glob.gePath();
|
||||
if (gePath.isEmpty() || !QFile(gePath).exists()) {
|
||||
ui->FieldsTW->setDisabled(false);
|
||||
ui->logTable->setDisabled(false);
|
||||
@@ -585,10 +584,9 @@ void logsDialog::moveLegend()
|
||||
|
||||
void logsDialog::on_fileOpen_BT_clicked()
|
||||
{
|
||||
QSettings settings;
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Select your log file"), settings.value("lastLogDir").toString());
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Select your log file"), glob.lastLogDir());
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("lastLogDir", fileName);
|
||||
glob.lastLogDir( fileName );
|
||||
ui->FileName_LE->setText(fileName);
|
||||
if (cvsFileParse()) {
|
||||
ui->FieldsTW->clear();
|
||||
|
||||
Reference in New Issue
Block a user