diff options
Diffstat (limited to 'src/gui/image/qpixmap_raster.cpp')
-rw-r--r-- | src/gui/image/qpixmap_raster.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index f8fef9cada..8d5891aae2 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -354,7 +354,9 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC is_null = (w <= 0 || h <= 0); image.d->devicePixelRatio = sourceImage.devicePixelRatio(); + //ensure the pixmap and the image resulting from toImage() have the same cacheKey(); setSerialNumber(image.cacheKey() >> 32); + setDetachNumber(image.d->detach_no); } QImage* QRasterPlatformPixmap::buffer() |