mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 02:28:04 +02:00
Qt: fixed bug in SelectClipRgn(), we cannot translate region when painter clipping isn't enabled.
git-svn-id: trunk@24520 -
This commit is contained in:
parent
975ef069b2
commit
832a29abc0
@ -4330,9 +4330,13 @@ begin
|
||||
begin
|
||||
Result := TQtRegion(Rgn).GetRegionType;
|
||||
// RGN is in Device coordinates. Qt expects logical coordinates
|
||||
// so we need to convert RGN coords
|
||||
GetWindowOrgEx(DC, @P);
|
||||
TQtRegion(Rgn).translate(P.X, P.Y);
|
||||
// so we need to convert RGN coords,
|
||||
// but only if our painter clips already, otherwise we have a mess !
|
||||
if QtDC.getClipping then
|
||||
begin
|
||||
GetWindowOrgEx(DC, @P);
|
||||
TQtRegion(Rgn).translate(P.X, P.Y);
|
||||
end;
|
||||
QtDC.setClipRegion(TQtRegion(Rgn).Widget);
|
||||
end else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user