@@ -4330,7 +4330,7 @@ procedure TBaseVirtualTree.InitRootNode(OldSize: Cardinal = 0);
4330
4330
States := [vsInitialized, vsExpanded, vsHasChildren, vsVisible];
4331
4331
TotalHeight := FDefaultNodeHeight;
4332
4332
TotalCount := 1;
4333
- NodeHeight := FDefaultNodeHeight;
4333
+ SetNodeHeight( FDefaultNodeHeight) ;
4334
4334
Align := 50;
4335
4335
end;
4336
4336
end;
@@ -4414,7 +4414,7 @@ function TBaseVirtualTree.MakeNewNode: PVirtualNode;
4414
4414
begin
4415
4415
TotalCount := 1;
4416
4416
TotalHeight := FDefaultNodeHeight;
4417
- NodeHeight := FDefaultNodeHeight;
4417
+ SetNodeHeight( FDefaultNodeHeight) ;
4418
4418
States := [vsVisible];
4419
4419
Align := 50;
4420
4420
end;
@@ -5180,7 +5180,7 @@ procedure TBaseVirtualTree.SetDefaultNodeHeight(Value: TDimension);
5180
5180
if FDefaultNodeHeight <> Value then
5181
5181
begin
5182
5182
Inc(FRoot.TotalHeight, Value - FDefaultNodeHeight);
5183
- Inc (FRoot.NodeHeight, Value - FDefaultNodeHeight);
5183
+ FRoot.SetNodeHeight (FRoot.NodeHeight + Value - FDefaultNodeHeight);
5184
5184
FDefaultNodeHeight := Value;
5185
5185
InvalidateCache;
5186
5186
if (FUpdateCount = 0) and HandleAllocated and not (csLoading in ComponentState) then
@@ -5599,7 +5599,7 @@ procedure TBaseVirtualTree.SetNodeHeight(Node: PVirtualNode; Value: TDimension);
5599
5599
if (Node.NodeHeight <> Value) then
5600
5600
begin
5601
5601
Difference := Value - Node.NodeHeight;
5602
- Node.NodeHeight := Value;
5602
+ Node.SetNodeHeight( Value) ;
5603
5603
5604
5604
// If the node is effectively filtered out, nothing else has to be done, as it is not visible anyway.
5605
5605
if not IsEffectivelyFiltered[Node] then
@@ -9027,7 +9027,7 @@ procedure TBaseVirtualTree.ScaleNodeHeights(M, D: Integer);
9027
9027
SetNodeHeight(Run, MulDiv(Run.NodeHeight, M, D))
9028
9028
else // prevent initialization of non-initialzed nodes
9029
9029
begin
9030
- Run.NodeHeight := MulDiv(Run.NodeHeight, M, D);
9030
+ Run.SetNodeHeight( MulDiv(Run.NodeHeight, M, D) );
9031
9031
// The next three lines fix issue #1000
9032
9032
lNewNodeTotalHeight := MulDiv(Run.TotalHeight, M, D);
9033
9033
FRoot.TotalHeight := Cardinal(Int64(FRoot.TotalHeight) + Int64(lNewNodeTotalHeight) - Int64(Run.TotalHeight)); // Avoiding EIntOverflow exception.
@@ -15122,7 +15122,7 @@ function TBaseVirtualTree.ReadChunk(Stream: TStream; Version: Integer; Node: PVi
15122
15122
begin
15123
15123
// Set states first, in case the node is invisible.
15124
15124
States := ChunkBody.States;
15125
- NodeHeight := ChunkBody.NodeHeight;
15125
+ SetNodeHeight( ChunkBody.NodeHeight) ;
15126
15126
TotalHeight := NodeHeight;
15127
15127
Align := ChunkBody.Align;
15128
15128
CheckState := ChunkBody.CheckState;
0 commit comments