Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

201 New installation will show first Contest in dropdown list #202

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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