Skip to content

Commit

Permalink
201 New installation will show first Contest in dropdown list (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
w7sst authored Mar 19, 2023
2 parents 0f5b28f + b741366 commit fb7bc25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Ini.pas
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ procedure FromIni;
begin
with TIniFile.Create(ChangeFileExt(ParamStr(0), '.ini')) do
try
// initial Contest pick will be first item in the Contest Dropdown.
V:= Ord(FindContestByName(MainForm.SimContestCombo.Items[0]));
// Load SimContest, but do not call SetContest() until UI is initialized.
V:= ReadInteger(SEC_TST, 'SimContest', Ord(scWpx));
V:= ReadInteger(SEC_TST, 'SimContest', V);
if V > Length(ContestDefinitions) then V := 0;
SimContest := TSimContest(V);
ActiveContest := @ContestDefinitions[SimContest];
Expand Down

0 comments on commit fb7bc25

Please sign in to comment.