Commit 89ed88975503392d42d56fbeccd54ed73306a940
1 parent
d741033e
Exists in
master
runner: fix open dialog button
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
experiment_runner/form_matrixgame.pas
@@ -337,11 +337,13 @@ begin | @@ -337,11 +337,13 @@ begin | ||
337 | if ButtonExpStart.Caption = CAPTION_START then | 337 | if ButtonExpStart.Caption = CAPTION_START then |
338 | if OpenDialog.Execute then | 338 | if OpenDialog.Execute then |
339 | begin | 339 | begin |
340 | + if not FGameControl.Experiment.LoadFromFile(OpenDialog.FileName) then | ||
341 | + Exit; | ||
340 | ButtonExpStart.Enabled := False; | 342 | ButtonExpStart.Enabled := False; |
341 | ButtonExpStart.Caption := CAPTION_RUNNING; | 343 | ButtonExpStart.Caption := CAPTION_RUNNING; |
342 | ButtonExpCancel.Enabled := not ButtonExpStart.Enabled; | 344 | ButtonExpCancel.Enabled := not ButtonExpStart.Enabled; |
343 | ButtonExpPause.Enabled := not ButtonExpStart.Enabled; | 345 | ButtonExpPause.Enabled := not ButtonExpStart.Enabled; |
344 | - FGameControl.Experiment.LoadFromFile(OpenDialog.FileName); | 346 | + |
345 | end; | 347 | end; |
346 | 348 | ||
347 | if ButtonExpStart.Caption = CAPTION_RESUME then | 349 | if ButtonExpStart.Caption = CAPTION_RESUME then |