scenes/qpainter: Avoid setting brush in paintBackground()

Calling QPainter::setBrush() without saving the current state, produces
mysterious black rectangles around clip region rects.
This commit is contained in:
Vlad Zahorodnii 2021-07-24 14:31:12 +03:00
parent 501298b0e0
commit 603db353a3

View file

@ -114,9 +114,8 @@ void SceneQPainter::paint(int screenId, const QRegion &damage, const QList<Tople
void SceneQPainter::paintBackground(const QRegion &region)
{
m_painter->setBrush(Qt::black);
for (const QRect &rect : region) {
m_painter->drawRect(rect);
m_painter->fillRect(rect, Qt::black);
}
}