@@ -366,7 +366,7 @@ void OptDialog::showEvent(QShowEvent *event)
366366
367367 ui->tWOptions ->setCurrentIndex (0 );
368368
369- updateEnable ( );
369+ updateUi (processingOptions, solutionOptions, fileOptions );
370370}
371371// ---------------------------------------------------------------------------
372372void OptDialog::loadSettings ()
@@ -883,41 +883,22 @@ void OptDialog::updateOptions()
883883 baseList = ui->tEBaseList ->toPlainText ();
884884 }
885885}
886-
887- // ---------------------------------------------------------------------------
888- void OptDialog::accept ()
889- {
890- updateOptions ();
891-
892- QDialog::accept ();
893- }
894- // ---------------------------------------------------------------------------
895- void OptDialog::load (const QString &file)
886+ void OptDialog::updateUi (const prcopt_t &prcopt, const solopt_t &solopt, const filopt_t &filopt)
896887{
897888 QLineEdit *editu[] = {ui->lERoverPosition1 , ui->lERoverPosition2 , ui->lERoverPosition3 };
898889 QLineEdit *editr[] = {ui->lEReferencePosition1 , ui->lEReferencePosition2 , ui->lEReferencePosition3 };
899- prcopt_t prcopt = prcopt_default;
900- solopt_t solopt = solopt_default;
901- filopt_t filopt;
902-
903- memset (&filopt, 0 , sizeof (filopt_t ));
904890
905- resetsysopts ();
906- if (!loadopts (qPrintable (file), sysopts)) return ;
907- if (appOptions && !loadopts (qPrintable (file), appOptions)) return ;
908- if (!loadopts (qPrintable (file), naviopts)) return ;
909- getsysopts (&prcopt, &solopt, &filopt);
910891 proxyAddress = proxyaddr;
911892
912893 if (options == NaviOptions) {
913- ui->sBServerCycle ->setValue (serverCycle);
914- ui->sBTimeoutTime ->setValue (timeoutTime);
915- ui->sBReconnectTime ->setValue (reconnectTime);
916- ui->sBNmeaCycle ->setValue (nmeaCycle);
917- ui->sBServerBufferSize ->setValue (serverBufferSize);
918- ui->cBNavSelect ->setCurrentIndex (navSelect);
919- ui->lEProxyAddress ->setText (proxyaddr);
920- ui->sBFileSwapMargin ->setValue (fileSwapMargin);
894+ ui->sBServerCycle ->setValue (serverCycle);
895+ ui->sBTimeoutTime ->setValue (timeoutTime);
896+ ui->sBReconnectTime ->setValue (reconnectTime);
897+ ui->sBNmeaCycle ->setValue (nmeaCycle);
898+ ui->sBServerBufferSize ->setValue (serverBufferSize);
899+ ui->cBNavSelect ->setCurrentIndex (navSelect);
900+ ui->lEProxyAddress ->setText (proxyaddr);
901+ ui->sBFileSwapMargin ->setValue (fileSwapMargin);
921902 }
922903
923904 ui->sBSbasSatellite ->setValue (prcopt.sbassatsel );
@@ -1071,7 +1052,31 @@ void OptDialog::load(const QString &file)
10711052 // filopt.trace
10721053
10731054 readAntennaList ();
1074- updateEnable ();
1055+ updateEnable ();
1056+ }
1057+ // ---------------------------------------------------------------------------
1058+ void OptDialog::accept ()
1059+ {
1060+ updateOptions ();
1061+
1062+ QDialog::accept ();
1063+ }
1064+ // ---------------------------------------------------------------------------
1065+ void OptDialog::load (const QString &file)
1066+ {
1067+ prcopt_t prcopt = prcopt_default;
1068+ solopt_t solopt = solopt_default;
1069+ filopt_t filopt;
1070+
1071+ memset (&filopt, 0 , sizeof (filopt_t ));
1072+
1073+ resetsysopts ();
1074+ if (!loadopts (qPrintable (file), sysopts)) return ;
1075+ if (appOptions && !loadopts (qPrintable (file), appOptions)) return ;
1076+ if (!loadopts (qPrintable (file), naviopts)) return ;
1077+ getsysopts (&prcopt, &solopt, &filopt);
1078+
1079+ updateUi (prcopt, solopt, filopt);
10751080}
10761081// ---------------------------------------------------------------------------
10771082void OptDialog::save (const QString &file)
@@ -1875,7 +1880,7 @@ int OptDialog::getPosition(int type, QLineEdit **edit, double *pos)
18751880 return ret;
18761881}
18771882// ---------------------------------------------------------------------------
1878- void OptDialog::setPosition (int type, QLineEdit **edit, double *pos)
1883+ void OptDialog::setPosition (int type, QLineEdit **edit, const double *pos)
18791884{
18801885 double p[3 ], dms1[3 ], dms2[3 ], s1, s2;
18811886
@@ -1977,7 +1982,7 @@ void OptDialog::showFrequenciesDialog()
19771982 delete freqDialog;
19781983}
19791984// ---------------------------------------------------------------------------
1980- QString OptDialog::excludedSatellitesString (prcopt_t *prcopt)
1985+ QString OptDialog::excludedSatellitesString (const prcopt_t *prcopt)
19811986{
19821987 QString buff;
19831988 char id[32 ];
0 commit comments