mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 23:38:02 +02:00
LCL-fpgui: Fix Canvas.BeginDraw() call in DeviceContext class + extra check added. Issue #35478, patch from Graeme.
git-svn-id: trunk@61127 -
This commit is contained in:
parent
a1e1ff2512
commit
627ed33840
@ -317,15 +317,20 @@ end;
|
||||
|
||||
constructor TFPGUIDeviceContext.Create(AFPGUIPrivate: TFPGUIPrivateWidget);
|
||||
begin
|
||||
if Assigned(AFPGUIPrivate) then begin
|
||||
// The Widget.Visible check is just for extra precaution.
|
||||
if Assigned(AFPGUIPrivate) and AFPGUIPrivate.Widget.Visible then
|
||||
begin
|
||||
fpgCanvas := AFPGUIPrivate.Widget.Canvas;
|
||||
fpgCanvas.BeginDraw(false);
|
||||
fpgCanvas.BeginDraw;
|
||||
FPrivateWidget:=AFPGUIPrivate;
|
||||
FPrivateWidget.DC:=HDC(Self);
|
||||
end else begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
fpgCanvas := nil;
|
||||
FPrivateWidget := nil;
|
||||
end;
|
||||
|
||||
with FOrg do begin
|
||||
X:=0;
|
||||
Y:=0;
|
||||
|
Loading…
Reference in New Issue
Block a user