mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
parent
50f1ab686a
commit
11a531ab62
@ -725,6 +725,7 @@ type
|
|||||||
FDuplicates: TDuplicates;
|
FDuplicates: TDuplicates;
|
||||||
FCaseSensitive : Boolean;
|
FCaseSensitive : Boolean;
|
||||||
FSorted: Boolean;
|
FSorted: Boolean;
|
||||||
|
FForceSort : Boolean;
|
||||||
FOwnsObjects : Boolean;
|
FOwnsObjects : Boolean;
|
||||||
procedure ExchangeItems(Index1, Index2: Integer);
|
procedure ExchangeItems(Index1, Index2: Integer);
|
||||||
procedure Grow;
|
procedure Grow;
|
||||||
|
@ -1260,14 +1260,17 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TStringList.SetCaseSensitive(b : boolean);
|
procedure TStringList.SetCaseSensitive(b : boolean);
|
||||||
begin
|
begin
|
||||||
if b<>FCaseSensitive then
|
if b=FCaseSensitive then
|
||||||
begin
|
Exit;
|
||||||
FCaseSensitive:=b;
|
FCaseSensitive:=b;
|
||||||
if FSorted then
|
if FSorted then
|
||||||
|
begin
|
||||||
|
FForceSort:=True;
|
||||||
sort;
|
sort;
|
||||||
|
FForceSort:=False;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function TStringList.DoCompareText(const s1,s2 : string) : PtrInt;
|
Function TStringList.DoCompareText(const s1,s2 : string) : PtrInt;
|
||||||
@ -1338,7 +1341,7 @@ end;
|
|||||||
Procedure TStringList.CustomSort(CompareFn: TStringListSortCompare);
|
Procedure TStringList.CustomSort(CompareFn: TStringListSortCompare);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If Not Sorted and (FCount>1) then
|
If (FForceSort or (Not Sorted)) and (FCount>1) then
|
||||||
begin
|
begin
|
||||||
Changing;
|
Changing;
|
||||||
QuickSort(0,FCount-1, CompareFn);
|
QuickSort(0,FCount-1, CompareFn);
|
||||||
|
Loading…
Reference in New Issue
Block a user