mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 03:57:16 +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;
|
function TQtWidgetSet.SelectClipRGN(DC: hDC; RGN: HRGN): Longint;
|
||||||
var
|
var
|
||||||
ARegion: QRegionH;
|
ARegion: QRegionH;
|
||||||
|
EmptyRegion: QRegionH;
|
||||||
Painter: QPainterH;
|
Painter: QPainterH;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
begin
|
begin
|
||||||
@ -3784,7 +3785,14 @@ begin
|
|||||||
if RGN <> 0 then
|
if RGN <> 0 then
|
||||||
QPainter_setClipRegion(Painter, TQtRegion(Rgn).Widget)
|
QPainter_setClipRegion(Painter, TQtRegion(Rgn).Widget)
|
||||||
else
|
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
|
if QPainter_hasClipping(Painter) then
|
||||||
begin
|
begin
|
||||||
ARegion := QRegion_Create;
|
ARegion := QRegion_Create;
|
||||||
|
Loading…
Reference in New Issue
Block a user