Fix under non-integer scaling incorrect update area
Given some decimal scaling, the clipping of the QRegion/QRect passed to the QRegion/QRect done inside paintEvent cannot handle the decimal scaling. Solved by only converting QRect to a certain QRectF and calling QRectF overload instead of QRect. Fixes: QTBUG-82601 Fixes: QTBUG-64854 Pick-to: 5.15 Change-Id: I0d8f4193aabfc0d917612db68d2a39ebb726fa2f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
fd0473f489
commit
b4aee30692
@ -204,7 +204,7 @@ inline QRegion scale(const QRegion ®ion, qreal scaleFactor, QPoint origin = Q
|
||||
|
||||
QRegion scaled;
|
||||
for (const QRect &rect : region)
|
||||
scaled += scale(rect, scaleFactor, origin);
|
||||
scaled += scale(QRectF(rect), scaleFactor, origin).toRect();
|
||||
return scaled;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user