Ignore:
Timestamp:
Jun 19, 2017, 10:06:50 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Some application states were not stored/restored correctly after application restart.
  • Fixed: Default maximized form state for PersistentForm.
  • Fixed: Do not scale up maximized forms according DPI settings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r128 r132  
    7575    procedure AZoomInExecute(Sender: TObject);
    7676    procedure AZoomOutExecute(Sender: TObject);
    77     procedure FormActivate(Sender: TObject);
    7877    procedure FormShow(Sender: TObject);
    7978    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    242241end;
    243242
    244 procedure TFormMain.FormActivate(Sender: TObject);
    245 begin
    246   if not Core.Initialized then begin
    247     Core.Init;
    248   end;
    249 end;
    250 
    251243procedure TFormMain.AZoomAllExecute(Sender: TObject);
    252244var
     
    313305begin
    314306  Core.Game.Running := False;
     307  Core.PersistentForm.Save(Self);
    315308  SaveConfig(Core.XMLConfig1, 'FormMain');
    316   Core.PersistentForm.Save(Self);
     309  Core.XMLConfig1.Flush;
    317310end;
    318311
     
    334327procedure TFormMain.FormShow(Sender: TObject);
    335328begin
    336   Core.XMLConfig1.Filename := 'Config.xml';
     329  Core.Init;
    337330  LoadConfig(Core.XMLConfig1, 'FormMain');
    338   Core.PersistentForm.Load(Self, True);
     331  Core.PersistentForm.Load(Self, wsMaximized);
    339332  ReloadView;
    340333  Redraw;
Note: See TracChangeset for help on using the changeset viewer.