Ignore:
Timestamp:
Sep 9, 2018, 11:45:45 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Load and start new game after main form is shown so cells can be correctly zoomed to be visible all.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r221 r227  
    6969    procedure AToolBarBigIconsExecute(Sender: TObject);
    7070    procedure AToolBarVisibleExecute(Sender: TObject);
     71    procedure FormActivate(Sender: TObject);
    7172    procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
    7273    procedure FormShow(Sender: TObject);
     
    7778    procedure Timer1Timer(Sender: TObject);
    7879  private
     80    FormActivated: Boolean;
     81    procedure ApplicationStart(Ptr: IntPtr);
    7982  public
    8083    procedure LoadConfig(Config: TXmlConfig; Path: string);
     
    173176end;
    174177
     178procedure TFormMain.FormActivate(Sender: TObject);
     179begin
     180  if not FormActivated then begin
     181    FormActivated := True;
     182  end;
     183end;
     184
    175185procedure TFormMain.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState
    176186  );
     
    191201begin
    192202  FormClient.Free;
     203end;
     204
     205procedure TFormMain.ApplicationStart(Ptr: IntPtr);
     206begin
     207  Core.ReopenGameOnInit;
    193208end;
    194209
     
    202217  ReloadView;
    203218  FormClient.Show;
     219  Application.QueueAsyncCall(ApplicationStart, 0);
    204220end;
    205221
Note: See TracChangeset for help on using the changeset viewer.