Ignore:
Timestamp:
Feb 6, 2017, 12:59:59 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Update filtered acronyms in main window if they were changed in acronyms and categories window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r147 r148  
    134134    ProjectClosed: Boolean;
    135135    ImportTotalItemCount: Integer;
     136    procedure AcronymDbUpdate(Sender: TObject);
    136137    function FilterCell(Text1, Text2: string): Boolean;
    137138    procedure ProcessImportsJob(Job: TJob);
     
    258259begin
    259260  AFileClose.Execute;
    260   if ProjectClosed  then begin
     261  if not Assigned(Core.AcronymDb)  then begin
    261262    Core.AcronymDb := TAcronymDb.Create;
    262263    Core.AcronymDb.FileName := DefaultFileName;
    263264    Core.AcronymDb.Acronyms.Clear;
     265    Core.AcronymDb.OnUpdate.Add(AcronymDbUpdate);
    264266    UpdateAcronymsList;
    265267    UpdateInterface;
     
    533535end;
    534536
     537procedure TFormMain.AcronymDbUpdate(Sender: TObject);
     538begin
     539  UpdateAcronymsList;
     540end;
     541
    535542function TFormMain.FilterCell(Text1, Text2: string): Boolean;
    536543begin
     
    547554begin
    548555  AFileClose.Execute;
    549   if ProjectClosed then begin
     556  if not Assigned(Core.AcronymDb) then begin
    550557    try
    551558      AFileNew.Execute;
     
    604611begin
    605612  AFileClose.Execute;
    606   if ProjectClosed then begin
     613  if not Assigned(Core.AcronymDb) then begin
    607614    AFileNew.Execute;
    608615    Core.AcronymDb.LoadFromFile(TMenuItem(Sender).Caption);
Note: See TracChangeset for help on using the changeset viewer.