Skip to content
Snippets Groups Projects
Commit 1c571917 authored by Rob Swindell's avatar Rob Swindell :speech_balloon: Committed by Deucе
Browse files

Don't use/set SM_EURODATE in sys_misc (deprecated), use sys_date_fmt instead

Fix off-by-one error in checking TimeZoneComboBox->ItemIndex again tz_val
array. When choosing the last (Other/Automatic) item, no change to the
sys_timezone should be made (was setting it to 0/UTC).
parent 45beb5b5
No related branches found
No related tags found
No related merge requests found
...@@ -246,7 +246,7 @@ void __fastcall TConfigWizard::FormShow(TObject *Sender) ...@@ -246,7 +246,7 @@ void __fastcall TConfigWizard::FormShow(TObject *Sender)
Time24hrRadioButton->Checked=true; Time24hrRadioButton->Checked=true;
else else
Time12hrRadioButton->Checked=true; Time12hrRadioButton->Checked=true;
if(scfg.sys_misc&SM_EURODATE) if(scfg.sys_date_fmt == DDMMYY)
DateEuRadioButton->Checked=true; DateEuRadioButton->Checked=true;
else else
DateUsRadioButton->Checked=true; DateUsRadioButton->Checked=true;
...@@ -284,7 +284,7 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender) ...@@ -284,7 +284,7 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender)
SAFECOPY(scfg.qnet_tagline,QNetTaglineEdit->Text.c_str()); SAFECOPY(scfg.qnet_tagline,QNetTaglineEdit->Text.c_str());
scfg.sys_nodes=NodesUpDown->Position; scfg.sys_nodes=NodesUpDown->Position;
if(TimeZoneComboBox->ItemIndex>=0 if(TimeZoneComboBox->ItemIndex>=0
&& TimeZoneComboBox->ItemIndex<=sizeof(tz_val)/sizeof(tz_val[0])) && TimeZoneComboBox->ItemIndex < sizeof(tz_val)/sizeof(tz_val[0]))
scfg.sys_timezone=tz_val[TimeZoneComboBox->ItemIndex]; scfg.sys_timezone=tz_val[TimeZoneComboBox->ItemIndex];
if(DaylightCheckBox->Checked) if(DaylightCheckBox->Checked)
scfg.sys_timezone|=DAYLIGHT; scfg.sys_timezone|=DAYLIGHT;
...@@ -293,9 +293,9 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender) ...@@ -293,9 +293,9 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender)
else else
scfg.sys_misc&=~SM_MILITARY; scfg.sys_misc&=~SM_MILITARY;
if(DateEuRadioButton->Checked) if(DateEuRadioButton->Checked)
scfg.sys_misc|=SM_EURODATE; scfg.sys_date_fmt = DDMMYY;
else else
scfg.sys_misc&=~SM_EURODATE; scfg.sys_date_fmt = MMDDYY;
if(NewUsersCheckBox->Checked) if(NewUsersCheckBox->Checked)
scfg.sys_misc&=~SM_CLOSED; scfg.sys_misc&=~SM_CLOSED;
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment