mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 21:37:11 +02:00
(Qt): Fixed bug #9368 - we must pass empty region instead of nil.
git-svn-id: trunk@11747 -
This commit is contained in:
parent
46f8083546
commit
9aca341e7e
@ -3774,6 +3774,7 @@ end;
|
||||
function TQtWidgetSet.SelectClipRGN(DC: hDC; RGN: HRGN): Longint;
|
||||
var
|
||||
ARegion: QRegionH;
|
||||
EmptyRegion: QRegionH;
|
||||
Painter: QPainterH;
|
||||
R: TRect;
|
||||
begin
|
||||
@ -3784,7 +3785,14 @@ begin
|
||||
if RGN <> 0 then
|
||||
QPainter_setClipRegion(Painter, TQtRegion(Rgn).Widget)
|
||||
else
|
||||
QPainter_setClipRegion(Painter, nil, QtNoClip);
|
||||
begin
|
||||
EmptyRegion := QRegion_create;
|
||||
try
|
||||
QPainter_setClipRegion(Painter, EmptyRegion, QtNoClip);
|
||||
finally
|
||||
QRegion_destroy(EmptyRegion);
|
||||
end;
|
||||
end;
|
||||
if QPainter_hasClipping(Painter) then
|
||||
begin
|
||||
ARegion := QRegion_Create;
|
||||
|
Loading…
Reference in New Issue
Block a user