Skip to content

Commit

Permalink
201 New installation will show first Contest in dropdown list
Browse files Browse the repository at this point in the history
  • Loading branch information
w7sst committed Mar 19, 2023
1 parent cd3664b commit b741366
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 b741366

Please sign in to comment.