Changeset 34 for trunk/UContact.pas


Ignore:
Timestamp:
Nov 25, 2021, 1:51:20 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Memory allocation during files merge.
  • Fixed: Select all context menu action was not selecting all items.
  • Modified: Statusbar moved into contacts form and it is now showin total, filtered and selected number of items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UContact.pas

    r33 r34  
    302302  I: Integer;
    303303begin
    304   List.Clear;
     304  while List.Count > Count do List.Delete(List.Count - 1);
     305  while List.Count < Count do List.Add(nil);
    305306  for I := 0 to Count - 1 do
    306     List.Add(Items[I]);
     307    List[I] := Items[I];
    307308end;
    308309
     
    425426
    426427procedure TContact.Assign(Source: TContact);
    427 begin
    428   Properties.Assign(Source.Properties);
     428var
     429  I: Integer;
     430begin
     431  while Properties.Count < Source.Properties.Count do
     432    Properties.Add(TContactProperty.Create);
     433  while Properties.Count > Source.Properties.Count do
     434    Properties.Delete(Properties.Count - 1);
     435  for I := 0 to Properties.Count - 1 do
     436    Properties[I].Assign(Source.Properties[I]);
    429437end;
    430438
Note: See TracChangeset for help on using the changeset viewer.