Ignore:
Timestamp:
Jul 13, 2016, 3:24:45 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Error during removing acronyms in case that multiple acronyms with same name exists.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAcronyms.pas

    r27 r34  
    147147      not FormMain.CompareStrings(TempEntry.Categories, TempCategories) then begin
    148148        // TODO: Update item inplace if possible
    149         FormMain.AcronymDb.RemoveAcronym(Acronym.Name, Name);
     149        FormMain.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Selected.Data));
    150150        Meaning := FormMain.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning);
    151151        Meaning.Description := TempEntry.Description;
     
    172172        if ListViewAcronyms.Items[I].Selected then begin
    173173          ListViewAcronyms.Items[I].Selected := False;
    174           FormMain.AcronymDb.RemoveAcronym(
    175             TAcronymMeaning(ListViewAcronyms.Items[I].Data).Acronym.Name,
    176             TAcronymMeaning(ListViewAcronyms.Items[I].Data).Name);
     174          FormMain.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Items[I].Data));
    177175        end;
    178176      UpdateAcronymsList;
     
    202200    case Column of
    203201      0: Result := CompareString(TAcronymMeaning(Item1).Acronym.Name, TAcronymMeaning(Item2).Acronym.Name);
    204       1: Result := CompareString(TAcronymMeaning(Item1).Description, TAcronymMeaning(Item2).Description);
     202      1: Result := CompareString(TAcronymMeaning(Item1).Name, TAcronymMeaning(Item2).Name);
    205203      2: Result := CompareString(TAcronymMeaning(Item1).Categories.GetString, TAcronymMeaning(Item2).Categories.GetString);
    206204    end;
Note: See TracChangeset for help on using the changeset viewer.