Changeset 107 for trunk


Ignore:
Timestamp:
Feb 10, 2022, 12:05:11 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Avoid multiple interface update during main form loading.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r90 r107  
    110110procedure TFormMain.FormShow(Sender: TObject);
    111111begin
    112   SetToolbarHints;
    113   Core.Initialize;
    114   Core.ThemeManager1.UseTheme(Self);
    115   Core.PersistentForm1.Load(Self);
    116   Core.ScaleDPI1.ScaleControl(CoolBar1, Core.ScaleDPI1.DesignDPI);
    117   CoolBar1.AutosizeBands;
     112  FormContacts.BeginUpdate;
     113  try
     114    SetToolbarHints;
     115    Core.Initialize;
     116    Core.ThemeManager1.UseTheme(Self);
     117    Core.PersistentForm1.Load(Self);
     118    Core.ScaleDPI1.ScaleControl(CoolBar1, Core.ScaleDPI1.DesignDPI);
     119    CoolBar1.AutosizeBands;
    118120
    119   FormContacts.Contacts := TContactsFile(Core.DataFile).Contacts;
    120   FormContacts.ManualDock(Self, nil, alClient);
    121   FormContacts.Align := alClient;
    122   FormContacts.Show;
     121    FormContacts.Contacts := TContactsFile(Core.DataFile).Contacts;
     122    FormContacts.ManualDock(Self, nil, alClient);
     123    FormContacts.Align := alClient;
     124    FormContacts.Show;
     125  finally
     126    FormContacts.EndUpdate;
     127  end;
    123128end;
    124129
Note: See TracChangeset for help on using the changeset viewer.