Skip to content

Commit 2bdeaba

Browse files
committed
Fixed issue #930: Removing Canvas.Refresh from TBaseVirtualTree.PaintCheckImage breaks painting of grid lines.
1 parent 2d9d3f2 commit 2bdeaba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/VirtualTrees.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23876,7 +23876,7 @@ procedure TBaseVirtualTree.PaintCheckImage(Canvas: TCanvas; const ImageInfo: TVT
2387623876
end;//if
2387723877
R := Rect(XPos, YPos, XPos + lSize.cx, YPos + lSize.cy);
2387823878
StyleServices.DrawElement(Canvas.Handle, Details, R);
23879-
//Canvas.Refresh; // Why is this needed?
23879+
Canvas.Refresh; // Every time you give a Canvas.Handle away to some other code you can't control you have to call Canvas.Refresh afterwards because the Canvas object and the HDC can be out of sync.
2388023880
end;
2388123881
if (Index in [ckButtonNormal..ckButtonDisabled]) then begin
2388223882
Canvas.Pen.Color := clGray;

0 commit comments

Comments
 (0)