Skip to content

Commit

Permalink
Followup commit for #1084: Removed unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmarder committed Feb 9, 2022
1 parent 5ac76b9 commit 47564b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/VirtualTrees.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33808,7 +33808,6 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo;
TripleWidth: Integer;
R: TRect;
DrawFormat: Cardinal;
Size: TSize;
Height: Integer;

begin
Expand Down Expand Up @@ -33851,9 +33850,8 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo;
// If the font has been changed then the ellipsis width must be recalculated.
TripleWidth := 0;
// Recalculate also the width of the normal text.
NodeWidth := Size.cx + 2 * FTextMargin;
NodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin;
InvalidateNode(Node); // repaint node and selection
InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084
end;

DrawFormat := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE;
Expand Down

0 comments on commit 47564b8

Please sign in to comment.