Skipped grabbing of widget with invalid rect.
This commit is contained in:
parent
797c731d27
commit
0a713c1c7b
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ QImage GrabWidgetToImage(not_null<QWidget*> target, QRect rect, QColor bg) {
|
||||||
if (!target->testAttribute(Qt::WA_OpaquePaintEvent)) {
|
if (!target->testAttribute(Qt::WA_OpaquePaintEvent)) {
|
||||||
result.fill(bg);
|
result.fill(bg);
|
||||||
}
|
}
|
||||||
{
|
if (rect.isValid()) {
|
||||||
QPainter p(&result);
|
QPainter p(&result);
|
||||||
RenderWidget(p, target, QPoint(), rect);
|
RenderWidget(p, target, QPoint(), rect);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue