mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 11:16:09 +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);
|
||||
Result := Widget.Context;
|
||||
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);
|
||||
end;
|
||||
end else
|
||||
Result := HDC(QtScreenContext);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user