Changeset 67


Ignore:
Timestamp:
Jul 28, 2016, 1:19:28 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Number of acronyms per category was not updated properly after import source was processed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UAcronym.pas

    r66 r67  
    425425  Q: Integer;
    426426  I: Integer;
     427  J: Integer;
    427428  T: string;
    428429  LastLength: Integer;
     
    498499              AddedAcronym := Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning);
    499500              AddedAcronym.Description := NewAcronym.Description;
    500               AddedAcronym.Categories.Assign(Categories, laOr);
     501
     502              // Merge categories
     503              for J := 0 to Categories.Count - 1 do
     504              if AddedAcronym.Categories.IndexOf(Categories[J]) = -1 then begin
     505                AddedAcronym.Categories.Add(Categories[J]);
     506                TAcronymCategory(Categories[J]).AcronymMeanings.Add(AddedAcronym);
     507              end;
    501508              Inc(ItemCount);
    502509            end;
Note: See TracChangeset for help on using the changeset viewer.