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:
zeljko 2010-04-08 17:19:55 +00:00
parent 975ef069b2
commit 832a29abc0

View File

@ -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