Avoid rounding of the size in QGraphicsPixmapItem::boundingRect()
Fixes: QTBUG-75458 Change-Id: Ib240ddc0b490ae3c0348b6bfa290ad1f51b1e071 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
3386b875dd
commit
795af729d3
@ -9786,9 +9786,9 @@ QRectF QGraphicsPixmapItem::boundingRect() const
|
||||
return QRectF();
|
||||
if (d->flags & ItemIsSelectable) {
|
||||
qreal pw = 1.0;
|
||||
return QRectF(d->offset, d->pixmap.size() / d->pixmap.devicePixelRatio()).adjusted(-pw/2, -pw/2, pw/2, pw/2);
|
||||
return QRectF(d->offset, QSizeF(d->pixmap.size()) / d->pixmap.devicePixelRatio()).adjusted(-pw/2, -pw/2, pw/2, pw/2);
|
||||
} else {
|
||||
return QRectF(d->offset, d->pixmap.size() / d->pixmap.devicePixelRatio());
|
||||
return QRectF(d->offset, QSizeF(d->pixmap.size()) / d->pixmap.devicePixelRatio());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user