Skip to content

Commit

Permalink
Fix für issue #1087
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmarder committed Feb 17, 2022
1 parent 47564b8 commit 7319d4d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Source/VirtualTrees.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33809,7 +33809,7 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo;
R: TRect;
DrawFormat: Cardinal;
Height: Integer;

lNewNodeWidth: Integer;
begin
InitializeTextProperties(PaintInfo);
with PaintInfo do
Expand Down Expand Up @@ -33850,9 +33850,13 @@ 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 := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin;
InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084
end;
lNewNodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin;
if lNewNodeWidth <> NodeWidth then
begin
NodeWidth := lNewNodeWidth;
InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084
end;//if
end;// if FFontChanged

DrawFormat := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE;
if BidiMode <> bdLeftToRight then
Expand Down

0 comments on commit 7319d4d

Please sign in to comment.