@@ -5045,7 +5045,7 @@ procedure TBaseVirtualTree.SetChildCount(Node: PVirtualNode; NewChildCount: Card
50455045 while Remaining > 0 do
50465046 begin
50475047 Child := MakeNewNode;
5048- Child.Index := Index ;
5048+ Child.SetIndex( Index) ;
50495049 Child.PrevSibling := Node.LastChild;
50505050 if Assigned(Node.LastChild) then
50515051 Node.LastChild.NextSibling := Child;
@@ -13776,7 +13776,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
1377613776 Destination.PrevSibling := Node;
1377713777 Node.NextSibling := Destination;
1377813778 Node.SetParent(Destination.Parent);
13779- Node.Index := Destination.Index;
13779+ Node.SetIndex( Destination.Index) ;
1378013780 if Node.PrevSibling = nil then
1378113781 Node.Parent.FirstChild := Node
1378213782 else
@@ -13786,7 +13786,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
1378613786 Run := Destination;
1378713787 while Assigned(Run) do
1378813788 begin
13789- System.Inc (Run.Index);
13789+ Run.SetIndex (Run.Index + 1 );
1379013790 Run := Run.NextSibling;
1379113791 end;
1379213792 end;
@@ -13800,13 +13800,13 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
1380013800 Node.Parent.LastChild := Node
1380113801 else
1380213802 Node.NextSibling.PrevSibling := Node;
13803- Node.Index := Destination.Index;
13803+ Node.SetIndex( Destination.Index) ;
1380413804
1380513805 // reindex all following nodes
1380613806 Run := Node;
1380713807 while Assigned(Run) do
1380813808 begin
13809- System.Inc (Run.Index);
13809+ Run.SetIndex (Run.Index + 1 );
1381013810 Run := Run.NextSibling;
1381113811 end;
1381213812 end;
@@ -13828,12 +13828,12 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
1382813828 end;
1382913829 Node.PrevSibling := nil;
1383013830 Node.SetParent(Destination);
13831- Node.Index := 0 ;
13831+ Node.SetIndex(0) ;
1383213832 // reindex all following nodes
1383313833 Run := Node.NextSibling;
1383413834 while Assigned(Run) do
1383513835 begin
13836- System.Inc (Run.Index);
13836+ Run.SetIndex (Run.Index + 1 );
1383713837 Run := Run.NextSibling;
1383813838 end;
1383913839 end;
@@ -13856,9 +13856,9 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
1385613856 Node.NextSibling := nil;
1385713857 Node.SetParent(Destination);
1385813858 if Assigned(Node.PrevSibling) then
13859- Node.Index := Node.PrevSibling.Index + 1
13859+ Node.SetIndex( Node.PrevSibling.Index + 1)
1386013860 else
13861- Node.Index := 0 ;
13861+ Node.SetIndex(0) ;
1386213862 end;
1386313863 else
1386413864 // amNoWhere: do nothing
@@ -13972,7 +13972,7 @@ procedure TBaseVirtualTree.InternalDisconnectNode(Node: PVirtualNode; KeepFocus:
1397213972 Index := Node.Index;
1397313973 while Assigned(Run) do
1397413974 begin
13975- Run.Index := Index ;
13975+ Run.SetIndex( Index) ;
1397613976 System.Inc(Index);
1397713977 Run := Run.NextSibling;
1397813978 end;
@@ -15131,7 +15131,7 @@ function TBaseVirtualTree.ReadChunk(Stream: TStream; Version: Integer; Node: PVi
1513115131
1513215132 Run.PrevSibling := Node.LastChild;
1513315133 if Assigned(Run.PrevSibling) then
15134- Run.Index := Run.PrevSibling.Index + 1;
15134+ Run.SetIndex( Run.PrevSibling.Index + 1) ;
1513515135 if Assigned(Node.LastChild) then
1513615136 Node.LastChild.NextSibling := Run
1513715137 else
@@ -22479,7 +22479,7 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
2247922479 Run.PrevSibling := nil;
2248022480 Index := 0;
2248122481 repeat
22482- Run.Index := Index ;
22482+ Run.SetIndex( Index) ;
2248322483 System.Inc(Index);
2248422484 if Run.NextSibling = nil then
2248522485 Break;
0 commit comments