mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 16:29:32 +02:00
Qt: avoid asserts from GetDC() when QPixmap_grabWidget() is called.It shouldn't be there.QtDefaultContext is used
when font,brush etc is needed outside of paint event. git-svn-id: trunk@30546 -
This commit is contained in:
parent
44ab7e1912
commit
0de9b809b0
@ -2274,16 +2274,7 @@ begin
|
|||||||
Widget := TQtWidget(hWnd);
|
Widget := TQtWidget(hWnd);
|
||||||
Result := Widget.Context;
|
Result := Widget.Context;
|
||||||
if Result = 0 then
|
if Result = 0 then
|
||||||
begin
|
|
||||||
B := QPainter_isActive(QtDefaultContext.Widget);
|
|
||||||
if B then
|
|
||||||
QPainter_end(QtDefaultContext.Widget);
|
|
||||||
QPixmap_grabWidget(QtDefaultContext.ParentPixmap, Widget.Widget,
|
|
||||||
0, 0, Widget.getWidth, Widget.getHeight);
|
|
||||||
if B then
|
|
||||||
QPainter_begin(QtDefaultContext.Widget, QtDefaultContext.ParentPixmap);
|
|
||||||
Result := HDC(QtDefaultContext);
|
Result := HDC(QtDefaultContext);
|
||||||
end;
|
|
||||||
end else
|
end else
|
||||||
Result := HDC(QtScreenContext);
|
Result := HDC(QtScreenContext);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user