From 46b4ce12e9d3441938636e81cb8b5e7e59d20eba Mon Sep 17 00:00:00 2001 From: rich2014 Date: Sun, 2 Jun 2024 23:47:36 +0800 Subject: [PATCH] LCL: fix the issue #19685 that painting TGraphicsControl on Designer Overlay DC 1. the issue only occurs at design time 2. the issue is that Control should not be painted on Designer Overlay Layer --- lcl/include/wincontrol.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index 54bbbf51c9..345c1e52e0 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -4904,7 +4904,8 @@ begin //DebugLn('[TWinControl.PaintControls] ',Name,':',ClassName,' DC=',DbgS(DC,8)); if (csDestroying in ComponentState) - or ((DC=0) and (not HandleAllocated)) then + or ((DC=0) and (not HandleAllocated)) + or WidgetSet.IsDesignerDC(self.Handle,DC) then exit; {$IFDEF VerboseDsgnPaintMsg}