Changeset 68 for trunk/Packages


Ignore:
Timestamp:
Dec 10, 2021, 11:15:41 AM (3 years ago)
Author:
chronos
Message:
  • Fixed: Wrong field selected for duplicates find from field combobox selection in Find duplicates window.
  • Added: Sort list of contact fields in Find duplicates and Field windows.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UCommon.pas

    r22 r68  
    8585function TryHexToInt(Data: string; var Value: Integer): Boolean;
    8686function TryBinToInt(Data: string; var Value: Integer): Boolean;
     87procedure SortStrings(Strings: TStrings);
    8788
    8889
     
    677678end;
    678679
     680procedure SortStrings(Strings: TStrings);
     681var
     682  Tmp: TStringList;
     683begin
     684  Strings.BeginUpdate;
     685  try
     686    if Strings is TStringList then begin
     687      TStringList(Strings).Sort;
     688    end else begin
     689      Tmp := TStringList.Create;
     690      try
     691        Tmp.Assign(Strings);
     692        Tmp.Sort;
     693        Strings.Assign(Tmp);
     694      finally
     695        Tmp.Free;
     696      end;
     697    end;
     698  finally
     699    Strings.EndUpdate;
     700  end;
     701end;
     702
    679703
    680704initialization
Note: See TracChangeset for help on using the changeset viewer.