@@ -4325,7 +4325,7 @@ procedure TBaseVirtualTree.InitRootNode(OldSize: Cardinal = 0);
4325
4325
begin
4326
4326
// Indication that this node is the root node.
4327
4327
SetPrevSibling(FRoot);
4328
- NextSibling := FRoot;
4328
+ SetNextSibling( FRoot) ;
4329
4329
SetParent(Pointer(Self));
4330
4330
States := [vsInitialized, vsExpanded, vsHasChildren, vsVisible];
4331
4331
TotalHeight := FDefaultNodeHeight;
@@ -5046,7 +5046,7 @@ procedure TBaseVirtualTree.SetChildCount(Node: PVirtualNode; NewChildCount: Card
5046
5046
Child.SetIndex(Index);
5047
5047
Child.SetPrevSibling(Node.LastChild);
5048
5048
if Assigned(Node.LastChild) then
5049
- Node.LastChild.NextSibling := Child;
5049
+ Node.LastChild.SetNextSibling( Child) ;
5050
5050
Child.SetParent(Node);
5051
5051
Node.LastChild := Child;
5052
5052
if Node.FirstChild = nil then
@@ -13779,13 +13779,13 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13779
13779
begin
13780
13780
Node.SetPrevSibling(Destination.PrevSibling);
13781
13781
Destination.SetPrevSibling(Node);
13782
- Node.NextSibling := Destination;
13782
+ Node.SetNextSibling( Destination) ;
13783
13783
Node.SetParent(Destination.Parent);
13784
13784
Node.SetIndex(Destination.Index);
13785
13785
if Node.PrevSibling = nil then
13786
13786
Node.Parent.FirstChild := Node
13787
13787
else
13788
- Node.PrevSibling.NextSibling := Node;
13788
+ Node.PrevSibling.SetNextSibling( Node) ;
13789
13789
13790
13790
// reindex all following nodes
13791
13791
Run := Destination;
@@ -13797,8 +13797,8 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13797
13797
end;
13798
13798
amInsertAfter:
13799
13799
begin
13800
- Node.NextSibling := Destination.NextSibling;
13801
- Destination.NextSibling := Node;
13800
+ Node.SetNextSibling( Destination.NextSibling) ;
13801
+ Destination.SetNextSibling( Node) ;
13802
13802
Node.SetPrevSibling(Destination);
13803
13803
Node.SetParent(Destination.Parent);
13804
13804
if Node.NextSibling = nil then
@@ -13821,15 +13821,15 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13821
13821
begin
13822
13822
// If there's a first child then there must also be a last child.
13823
13823
Destination.FirstChild.SetPrevSibling(Node);
13824
- Node.NextSibling := Destination.FirstChild;
13824
+ Node.SetNextSibling( Destination.FirstChild) ;
13825
13825
Destination.FirstChild := Node;
13826
13826
end
13827
13827
else
13828
13828
begin
13829
13829
// First child node at this location.
13830
13830
Destination.FirstChild := Node;
13831
13831
Destination.LastChild := Node;
13832
- Node.NextSibling := nil;
13832
+ Node.SetNextSibling( nil) ;
13833
13833
end;
13834
13834
Node.SetPrevSibling(nil);
13835
13835
Node.SetParent(Destination);
@@ -13847,7 +13847,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13847
13847
if Assigned(Destination.LastChild) then
13848
13848
begin
13849
13849
// If there's a last child then there must also be a first child.
13850
- Destination.LastChild.NextSibling := Node;
13850
+ Destination.LastChild.SetNextSibling( Node) ;
13851
13851
Node.SetPrevSibling(Destination.LastChild);
13852
13852
Destination.LastChild := Node;
13853
13853
end
@@ -13858,7 +13858,7 @@ procedure TBaseVirtualTree.InternalConnectNode(Node, Destination: PVirtualNode;
13858
13858
Destination.LastChild := Node;
13859
13859
Node.SetPrevSibling(nil);
13860
13860
end;
13861
- Node.NextSibling := nil;
13861
+ Node.SetNextSibling( nil) ;
13862
13862
Node.SetParent(Destination);
13863
13863
if Assigned(Node.PrevSibling) then
13864
13864
Node.SetIndex(Node.PrevSibling.Index + 1)
@@ -13963,7 +13963,7 @@ procedure TBaseVirtualTree.InternalDisconnectNode(Node: PVirtualNode; KeepFocus:
13963
13963
System.Dec(FVisibleCount, CountVisibleChildren(Node) + Cardinal(IfThen(IsEffectivelyVisible[Node], 1)));
13964
13964
13965
13965
if Assigned(Node.PrevSibling) then
13966
- Node.PrevSibling.NextSibling := Node.NextSibling
13966
+ Node.PrevSibling.SetNextSibling( Node.NextSibling)
13967
13967
else
13968
13968
Parent.FirstChild := Node.NextSibling;
13969
13969
@@ -15138,7 +15138,7 @@ function TBaseVirtualTree.ReadChunk(Stream: TStream; Version: Integer; Node: PVi
15138
15138
if Assigned(Run.PrevSibling) then
15139
15139
Run.SetIndex(Run.PrevSibling.Index + 1);
15140
15140
if Assigned(Node.LastChild) then
15141
- Node.LastChild.NextSibling := Run
15141
+ Node.LastChild.SetNextSibling( Run)
15142
15142
else
15143
15143
Node.FirstChild := Run;
15144
15144
Node.LastChild := Run;
@@ -16902,7 +16902,7 @@ procedure TBaseVirtualTree.DeleteChildren(Node: PVirtualNode; ResetHasChildren:
16902
16902
Run := Run.PrevSibling;
16903
16903
// Important, to avoid exchange of invalid pointers while disconnecting the node.
16904
16904
if Assigned(Run) then
16905
- Run.NextSibling := nil;
16905
+ Run.SetNextSibling( nil) ;
16906
16906
DeleteNode(Mark, False, True);
16907
16907
end;
16908
16908
if ResetHasChildren then
@@ -22327,23 +22327,23 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22327
22327
22328
22328
if CompareResult <= 0 then
22329
22329
begin
22330
- Result.NextSibling := A ;
22330
+ Result.SetNextSibling(A) ;
22331
22331
Result := A;
22332
22332
A := A.NextSibling;
22333
22333
end
22334
22334
else
22335
22335
begin
22336
- Result.NextSibling := B ;
22336
+ Result.SetNextSibling(B) ;
22337
22337
Result := B;
22338
22338
B := B.NextSibling;
22339
22339
end;
22340
22340
end;
22341
22341
22342
22342
// Just append the list which is not nil (or set end of result list to nil if both lists are nil).
22343
22343
if Assigned(A) then
22344
- Result.NextSibling := A
22344
+ Result.SetNextSibling(A)
22345
22345
else
22346
- Result.NextSibling := B ;
22346
+ Result.SetNextSibling(B) ;
22347
22347
// return start of the new merged list
22348
22348
Result := Dummy.NextSibling;
22349
22349
end;
@@ -22370,23 +22370,23 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22370
22370
22371
22371
if CompareResult >= 0 then
22372
22372
begin
22373
- Result.NextSibling := A ;
22373
+ Result.SetNextSibling(A) ;
22374
22374
Result := A;
22375
22375
A := A.NextSibling;
22376
22376
end
22377
22377
else
22378
22378
begin
22379
- Result.NextSibling := B ;
22379
+ Result.SetNextSibling(B) ;
22380
22380
Result := B;
22381
22381
B := B.NextSibling;
22382
22382
end;
22383
22383
end;
22384
22384
22385
22385
// Just append the list which is not nil (or set end of result list to nil if both lists are nil).
22386
22386
if Assigned(A) then
22387
- Result.NextSibling := A
22387
+ Result.SetNextSibling(A)
22388
22388
else
22389
- Result.NextSibling := B ;
22389
+ Result.SetNextSibling(B) ;
22390
22390
// Return start of the newly merged list.
22391
22391
Result := Dummy.NextSibling;
22392
22392
end;
@@ -22411,7 +22411,7 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22411
22411
begin
22412
22412
Result := Node;
22413
22413
Node := Node.NextSibling;
22414
- Result.NextSibling := nil;
22414
+ Result.SetNextSibling( nil) ;
22415
22415
end;
22416
22416
end;
22417
22417
@@ -22435,7 +22435,7 @@ procedure TBaseVirtualTree.Sort(Node: PVirtualNode; Column: TColumnIndex; Direct
22435
22435
begin
22436
22436
Result := Node;
22437
22437
Node := Node.NextSibling;
22438
- Result.NextSibling := nil;
22438
+ Result.SetNextSibling( nil) ;
22439
22439
end;
22440
22440
end;
22441
22441
0 commit comments