Skip to content

Commit 7319d4d

Browse files
committed
Fix für issue #1087
1 parent 47564b8 commit 7319d4d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Source/VirtualTrees.pas

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33809,7 +33809,7 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo;
3380933809
R: TRect;
3381033810
DrawFormat: Cardinal;
3381133811
Height: Integer;
33812-
33812+
lNewNodeWidth: Integer;
3381333813
begin
3381433814
InitializeTextProperties(PaintInfo);
3381533815
with PaintInfo do
@@ -33850,9 +33850,13 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo;
3385033850
// If the font has been changed then the ellipsis width must be recalculated.
3385133851
TripleWidth := 0;
3385233852
// Recalculate also the width of the normal text.
33853-
NodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin;
33854-
InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084
33855-
end;
33853+
lNewNodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin;
33854+
if lNewNodeWidth <> NodeWidth then
33855+
begin
33856+
NodeWidth := lNewNodeWidth;
33857+
InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084
33858+
end;//if
33859+
end;// if FFontChanged
3385633860

3385733861
DrawFormat := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE;
3385833862
if BidiMode <> bdLeftToRight then

0 commit comments

Comments
 (0)