From 8d471ab5705de5c07807a5d17bd34cfc97aa3dae Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Thu, 26 Apr 2012 15:32:29 +0000 Subject: [PATCH] LCL-CustomDrawn: Further improves TCustomGrid git-svn-id: trunk@37037 - --- lcl/interfaces/customdrawn/customdrawnwinapi.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/customdrawn/customdrawnwinapi.inc b/lcl/interfaces/customdrawn/customdrawnwinapi.inc index 4cb6e71793..418749bf29 100644 --- a/lcl/interfaces/customdrawn/customdrawnwinapi.inc +++ b/lcl/interfaces/customdrawn/customdrawnwinapi.inc @@ -4703,7 +4703,11 @@ begin lControlHandle.IncInvalidateCount(); lControl := lControlHandle.WinControl; lControl := Forms.GetParentForm(lControl); - Result := BackendInvalidateRect(lControl.Handle, Rect, BErase); + // Don't use Rect in BackendInvalidateRect unless we really make the full + // conversion of coordinates to window coordinates. Better invalidate everything + // then too few. And anyway on each draw we send everything. + // This fixes changing the selection in TCustomGrid + Result := BackendInvalidateRect(lControl.Handle, nil, BErase); end // Invalidate on a form else