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 543afd6573
commit da0cab134e

View File

@ -4954,7 +4954,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}