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/UFormAcronyms.pas

    r96 r97  
    131131      Meaning.Description := TempEntry.Description;
    132132      Meaning.Categories.AssignFromStrings(TempEntry.Categories);
     133
     134      // Update reverse references
    133135      for I := 0 to Meaning.Categories.Count - 1 do
    134         TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     136        if TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.IndexOf(Meaning) = -1 then
     137          TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     138
    135139      UpdateAcronymsList;
    136140      UpdateInterface;
     
    173177          Meaning.Description := TempEntry.Description;
    174178          Meaning.Categories.AssignFromStrings(TempEntry.Categories);
     179
     180          // Update reverse references
    175181          for I := 0 to Meaning.Categories.Count - 1 do
    176             TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     182            if TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.IndexOf(Meaning) = -1 then
     183              TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     184
    177185          UpdateAcronymsList;
    178186          UpdateInterface;
Note: See TracChangeset for help on using the changeset viewer.