@@ -5045,7 +5045,7 @@ procedure TBaseVirtualTree.SetChildCount(Node: PVirtualNode; NewChildCount: Card
5045
5045
while Remaining > 0 do
5046
5046
begin
5047
5047
Child := MakeNewNode;
5048
- Child.Index := Index ;
5048
+ Child.SetIndex( Index) ;
5049
5049
Child.PrevSibling := Node.LastChild;
5050
5050
if Assigned(Node.LastChild) then
5051
5051
Node.LastChild.NextSibling := Child;
@@ -13776,7 +13776,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13776
13776
Destination.PrevSibling := Node;
13777
13777
Node.NextSibling := Destination;
13778
13778
Node.SetParent(Destination.Parent);
13779
- Node.Index := Destination.Index;
13779
+ Node.SetIndex( Destination.Index) ;
13780
13780
if Node.PrevSibling = nil then
13781
13781
Node.Parent.FirstChild := Node
13782
13782
else
@@ -13786,7 +13786,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13786
13786
Run := Destination;
13787
13787
while Assigned(Run) do
13788
13788
begin
13789
- System.Inc (Run.Index);
13789
+ Run.SetIndex (Run.Index + 1 );
13790
13790
Run := Run.NextSibling;
13791
13791
end;
13792
13792
end;
@@ -13800,13 +13800,13 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13800
13800
Node.Parent.LastChild := Node
13801
13801
else
13802
13802
Node.NextSibling.PrevSibling := Node;
13803
- Node.Index := Destination.Index;
13803
+ Node.SetIndex( Destination.Index) ;
13804
13804
13805
13805
// reindex all following nodes
13806
13806
Run := Node;
13807
13807
while Assigned(Run) do
13808
13808
begin
13809
- System.Inc (Run.Index);
13809
+ Run.SetIndex (Run.Index + 1 );
13810
13810
Run := Run.NextSibling;
13811
13811
end;
13812
13812
end;
@@ -13828,12 +13828,12 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13828
13828
end;
13829
13829
Node.PrevSibling := nil;
13830
13830
Node.SetParent(Destination);
13831
- Node.Index := 0 ;
13831
+ Node.SetIndex(0) ;
13832
13832
// reindex all following nodes
13833
13833
Run := Node.NextSibling;
13834
13834
while Assigned(Run) do
13835
13835
begin
13836
- System.Inc (Run.Index);
13836
+ Run.SetIndex (Run.Index + 1 );
13837
13837
Run := Run.NextSibling;
13838
13838
end;
13839
13839
end;
@@ -13856,9 +13856,9 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13856
13856
Node.NextSibling := nil;
13857
13857
Node.SetParent(Destination);
13858
13858
if Assigned(Node.PrevSibling) then
13859
- Node.Index := Node.PrevSibling.Index + 1
13859
+ Node.SetIndex( Node.PrevSibling.Index + 1)
13860
13860
else
13861
- Node.Index := 0 ;
13861
+ Node.SetIndex(0) ;
13862
13862
end;
13863
13863
else
13864
13864
// amNoWhere: do nothing
@@ -13972,7 +13972,7 @@ procedure TBaseVirtualTree.InternalDisconnectNode(Node: PVirtualNode; KeepFocus:
13972
13972
Index := Node.Index;
13973
13973
while Assigned(Run) do
13974
13974
begin
13975
- Run.Index := Index ;
13975
+ Run.SetIndex( Index) ;
13976
13976
System.Inc(Index);
13977
13977
Run := Run.NextSibling;
13978
13978
end;
@@ -15131,7 +15131,7 @@ function TBaseVirtualTree.ReadChunk(Stream: TStream; Version: Integer; Node: PVi
15131
15131
15132
15132
Run.PrevSibling := Node.LastChild;
15133
15133
if Assigned(Run.PrevSibling) then
15134
- Run.Index := Run.PrevSibling.Index + 1;
15134
+ Run.SetIndex( Run.PrevSibling.Index + 1) ;
15135
15135
if Assigned(Node.LastChild) then
15136
15136
Node.LastChild.NextSibling := Run
15137
15137
else
@@ -22479,7 +22479,7 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22479
22479
Run.PrevSibling := nil;
22480
22480
Index := 0;
22481
22481
repeat
22482
- Run.Index := Index ;
22482
+ Run.SetIndex( Index) ;
22483
22483
System.Inc(Index);
22484
22484
if Run.NextSibling = nil then
22485
22485
Break;
0 commit comments