Ignore:
Timestamp:
Aug 22, 2016, 1:16:56 PM (8 years ago)
Author:
chronos
Message:
  • Added: Add support for acronym category selection in import source format.
  • Modified: Optimalized export speed.
  • Fixed: Export to MediaWiki tables was not correctly generated for multi line strings.
  • Fixed: Add back links from categories to import sources.
  • Added: Multi select support in category list.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormImportSources.pas

    r96 r97  
    184184var
    185185  NewImportSource: TImportSource;
     186  I: Integer;
    186187begin
    187188  NewImportSource := TImportSource.Create;
     
    194195      if not Assigned(ImportSources.SearchByName(NewImportSource.Name)) then begin;
    195196        ImportSources.Add(NewImportSource);
     197
     198        // Update reverse references
     199        for I := 0 to NewImportSource.Categories.Count - 1 do
     200          if TAcronymCategory(NewImportSource.Categories.Items[I]).ImportSources.IndexOf(NewImportSource) = -1 then
     201            TAcronymCategory(NewImportSource.Categories.Items[I]).ImportSources.Add(NewImportSource);
     202
    196203        NewImportSource := nil;
    197204        Core.AcronymDb.Modified := True;
     
    228235var
    229236  NewImportSource: TImportSource;
     237  I: Integer;
    230238begin
    231239  if Assigned(ListView1.Selected) then begin
     
    241249            TImportSource(ListView1.Selected.Data).Assign(NewImportSource);
    242250            Core.AcronymDb.Modified := True;
    243             UpdateList;
    244251          end else ShowMessage(Format(SImportSourceAlreadyExists, [NewImportSource.Name]));
    245252        end else begin
    246253          TImportSource(ListView1.Selected.Data).Assign(NewImportSource);
    247254          Core.AcronymDb.Modified := True;
    248           UpdateList;
    249255        end;
     256
     257        // Update reverse references
     258        TImportSource(ListView1.Selected.Data).Categories.UpdateLinkImportSources(TImportSource(ListView1.Selected.Data));
     259
     260        UpdateList;
    250261      end;
    251262      if Assigned(NewImportSource) then NewImportSource.Free;
Note: See TracChangeset for help on using the changeset viewer.