Changeset 145 for trunk/UCore.pas


Ignore:
Timestamp:
Nov 12, 2017, 1:47:20 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Do not create settings form on application start but just if form is opened.
  • Fixed: Removed various compilation warnings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r134 r145  
    357357procedure TCore.ASettingsExecute(Sender: TObject);
    358358begin
    359   FormSettings.Load;
    360   if FormSettings.ShowModal = mrOk then begin
    361     FormSettings.Save;
    362     Game.SaveConfig(XMLConfig1, 'Game');
     359  FormSettings := TFormSettings.Create(nil);
     360  try
     361    FormSettings.Load;
     362    if FormSettings.ShowModal = mrOk then begin
     363      FormSettings.Save;
     364      Game.SaveConfig(XMLConfig1, 'Game');
     365    end;
     366  finally
     367    FreeAndNil(FormSettings);
    363368  end;
    364369end;
Note: See TracChangeset for help on using the changeset viewer.