add const so we know that QImage is not being modified

This commit is contained in:
Albert Astals Cid
2025-10-01 19:15:10 +02:00
parent b83f4c0231
commit f1b0c9f0ec

View File

@ -3204,7 +3204,7 @@ void XCFImageFormat::mergeLayerIntoImage(XCFImage &xcf_image)
for (uint i = 0; i < layer.ncols; i++) {
qint32 x = qint32(i * TILE_WIDTH);
QImage &tile = layer.image_tiles[j][i];
const QImage &tile = layer.image_tiles[j][i];
if (x + layer.x_offset < XCF_MAX_IMAGE_WIDTH && y + layer.y_offset < XCF_MAX_IMAGE_HEIGHT) {
painter.drawImage(x + layer.x_offset, y + layer.y_offset, tile);
}