|
|
@@ -423,10 +423,35 @@ Procedure TStrings.Reverse(aList : TStrings);
|
|
|
|
|
|
Var
|
|
|
I : Integer;
|
|
|
+ lList : TStrings;
|
|
|
|
|
|
begin
|
|
|
- for I:=Count-1 downto 0 do
|
|
|
- aList.Add(Strings[i]);
|
|
|
+ if aList=self then
|
|
|
+ begin
|
|
|
+ lList:=Nil;
|
|
|
+ BeginUpdate;
|
|
|
+ try
|
|
|
+ lList:=TStringList.Create;
|
|
|
+ Reverse(lList);
|
|
|
+ AddStrings(lList,True);
|
|
|
+ finally
|
|
|
+ EndUpdate;
|
|
|
+ lList.Free;
|
|
|
+ end;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ aList.BeginUpdate;
|
|
|
+ try
|
|
|
+ aList.Clear;
|
|
|
+ if aList.Capacity<Self.Count then
|
|
|
+ aList.Capacity:=Self.Count;
|
|
|
+ for I:=Count-1 downto 0 do
|
|
|
+ aList.AddObject(Strings[i],Objects[i]);
|
|
|
+ finally
|
|
|
+ aList.EndUpdate;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
|