@@ -5047,9 +5047,9 @@ procedure TBaseVirtualTree.SetChildCount(Node: PVirtualNode; NewChildCount: Card
5047
5047
if Assigned(Node.LastChild) then
5048
5048
Node.LastChild.SetNextSibling(Child);
5049
5049
Child.SetParent(Node);
5050
- Node.LastChild := Child;
5050
+ Node.SetLastChild( Child) ;
5051
5051
if Node.FirstChild = nil then
5052
- Node.FirstChild := Child;
5052
+ Node.SetFirstChild( Child) ;
5053
5053
System.Dec(Remaining);
5054
5054
System.Inc(Index);
5055
5055
@@ -13775,7 +13775,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13775
13775
Node.SetParent(Destination.Parent);
13776
13776
Node.SetIndex(Destination.Index);
13777
13777
if Node.PrevSibling = nil then
13778
- Node.Parent.FirstChild := Node
13778
+ Node.Parent.SetFirstChild( Node)
13779
13779
else
13780
13780
Node.PrevSibling.SetNextSibling(Node);
13781
13781
@@ -13794,7 +13794,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13794
13794
Node.SetPrevSibling(Destination);
13795
13795
Node.SetParent(Destination.Parent);
13796
13796
if Node.NextSibling = nil then
13797
- Node.Parent.LastChild := Node
13797
+ Node.Parent.SetLastChild( Node)
13798
13798
else
13799
13799
Node.NextSibling.SetPrevSibling(Node);
13800
13800
Node.SetIndex(Destination.Index);
@@ -13814,13 +13814,13 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13814
13814
// If there's a first child then there must also be a last child.
13815
13815
Destination.FirstChild.SetPrevSibling(Node);
13816
13816
Node.SetNextSibling(Destination.FirstChild);
13817
- Destination.FirstChild := Node;
13817
+ Destination.SetFirstChild( Node) ;
13818
13818
end
13819
13819
else
13820
13820
begin
13821
13821
// First child node at this location.
13822
- Destination.FirstChild := Node;
13823
- Destination.LastChild := Node;
13822
+ Destination.SetFirstChild( Node) ;
13823
+ Destination.SetLastChild( Node) ;
13824
13824
Node.SetNextSibling(nil);
13825
13825
end;
13826
13826
Node.SetPrevSibling(nil);
@@ -13841,13 +13841,13 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13841
13841
// If there's a last child then there must also be a first child.
13842
13842
Destination.LastChild.SetNextSibling(Node);
13843
13843
Node.SetPrevSibling(Destination.LastChild);
13844
- Destination.LastChild := Node;
13844
+ Destination.SetLastChild( Node) ;
13845
13845
end
13846
13846
else
13847
13847
begin
13848
13848
// first child node at this location
13849
- Destination.FirstChild := Node;
13850
- Destination.LastChild := Node;
13849
+ Destination.SetFirstChild( Node) ;
13850
+ Destination.SetLastChild( Node) ;
13851
13851
Node.SetPrevSibling(nil);
13852
13852
end;
13853
13853
Node.SetNextSibling(nil);
@@ -13957,7 +13957,7 @@ procedure TBaseVirtualTree.InternalDisconnectNode(Node: PVirtualNode; KeepFocus:
13957
13957
if Assigned(Node.PrevSibling) then
13958
13958
Node.PrevSibling.SetNextSibling(Node.NextSibling)
13959
13959
else
13960
- Parent.FirstChild := Node.NextSibling;
13960
+ Parent.SetFirstChild( Node.NextSibling) ;
13961
13961
13962
13962
if Assigned(Node.NextSibling) then
13963
13963
begin
@@ -13976,7 +13976,7 @@ procedure TBaseVirtualTree.InternalDisconnectNode(Node: PVirtualNode; KeepFocus:
13976
13976
end;
13977
13977
end
13978
13978
else
13979
- Parent.LastChild := Node.PrevSibling;
13979
+ Parent.SetLastChild( Node.PrevSibling) ;
13980
13980
end;
13981
13981
end;
13982
13982
@@ -15132,8 +15132,8 @@ function TBaseVirtualTree.ReadChunk(Stream: TStream; Version: Integer; Node: PVi
15132
15132
if Assigned(Node.LastChild) then
15133
15133
Node.LastChild.SetNextSibling(Run)
15134
15134
else
15135
- Node.FirstChild := Run;
15136
- Node.LastChild := Run;
15135
+ Node.SetFirstChild( Run) ;
15136
+ Node.SetLastChild( Run) ;
15137
15137
Run.SetParent(Node);
15138
15138
15139
15139
ReadNode(Stream, Version, Run);
@@ -16912,8 +16912,8 @@ procedure TBaseVirtualTree.DeleteChildren(Node: PVirtualNode; ResetHasChildren:
16912
16912
AdjustTotalHeight(Node, NodeHeight[Node]);
16913
16913
AdjustTotalCount(Node, 1);
16914
16914
end;
16915
- Node.FirstChild := nil;
16916
- Node.LastChild := nil;
16915
+ Node.SetFirstChild( nil) ;
16916
+ Node.SetLastChild( nil) ;
16917
16917
finally
16918
16918
System.Dec(FUpdateCount);
16919
16919
end;
@@ -22463,9 +22463,9 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22463
22463
try
22464
22464
// Sort the linked list, check direction flag only once.
22465
22465
if Direction = sdAscending then
22466
- Node.FirstChild := MergeSortAscending(Node.FirstChild, Node.ChildCount)
22466
+ Node.SetFirstChild( MergeSortAscending(Node.FirstChild, Node.ChildCount) )
22467
22467
else
22468
- Node.FirstChild := MergeSortDescending(Node.FirstChild, Node.ChildCount);
22468
+ Node.SetFirstChild( MergeSortDescending(Node.FirstChild, Node.ChildCount) );
22469
22469
finally
22470
22470
EndOperation(okSortNode);
22471
22471
end;
@@ -22481,7 +22481,7 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22481
22481
Run.NextSibling.SetPrevSibling(Run);
22482
22482
Run := Run.NextSibling;
22483
22483
until False;
22484
- Node.LastChild := Run;
22484
+ Node.SetLastChild( Run) ;
22485
22485
22486
22486
InvalidateCache;
22487
22487
end;
0 commit comments