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
This commit is contained in:
rich2014 2024-06-02 23:47:36 +08:00
parent 3f43638383
commit 46b4ce12e9

View File

@ -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}