mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 09:12:30 +02:00
lcl: fix THeaderSections.AddItem (bug #0013806 by Hans-Peter Diettrich)
git-svn-id: trunk@20162 -
This commit is contained in:
parent
a8544fc87d
commit
a67684a1a6
@ -433,10 +433,13 @@ begin
|
||||
end;
|
||||
|
||||
function THeaderSections.AddItem(Item: THeaderSection; Index: Integer): THeaderSection;
|
||||
var i:longint;
|
||||
var
|
||||
i: longint;
|
||||
begin
|
||||
if Item = nil then
|
||||
Result := FHeaderControl.CreateSection;
|
||||
Result := FHeaderControl.CreateSection
|
||||
else
|
||||
Result := Item;
|
||||
|
||||
Result.Collection := Self;
|
||||
if Index > Count then
|
||||
@ -448,7 +451,6 @@ begin
|
||||
if Items[i].FOriginalIndex >= Index then
|
||||
Items[i].FOriginalIndex := Items[i].FOriginalIndex + 1;
|
||||
Result.FOriginalIndex := Index;
|
||||
|
||||
end;
|
||||
|
||||
function THeaderSections.Insert(Index: Integer): THeaderSection;
|
||||
|
Loading…
Reference in New Issue
Block a user