From 8b0c6dd7ae6260b39de28a9451565d00cb245ef8 Mon Sep 17 00:00:00 2001 From: craftablescience Date: Thu, 6 Jun 2024 13:08:45 -0400 Subject: [PATCH] fix(gui): "lay flat" vtf preview mode ignores alpha transparency checkbox --- src/gui/previews/VTFPreview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/previews/VTFPreview.cpp b/src/gui/previews/VTFPreview.cpp index bfede29..7b19d16 100644 --- a/src/gui/previews/VTFPreview.cpp +++ b/src/gui/previews/VTFPreview.cpp @@ -218,7 +218,7 @@ void VTFWidget::paintEvent(QPaintEvent*) { if (!imageData.empty()) { QImage currentImage(reinterpret_cast(imageData.data()), static_cast(this->vtf->getWidth(this->currentMip)), static_cast(this->vtf->getHeight(this->currentMip)), QImage::Format_RGBA8888); if (!this->alphaEnabled) { - this->image = this->image.convertedTo(QImage::Format_RGB888); + currentImage = currentImage.convertedTo(QImage::Format_RGB888); } painter.drawImage(QRect(zoomedXPos + (zoomedWidth * face) - (totalZoomedWidth / 2), zoomedYPos + (zoomedHeight * frame) - (totalZoomedHeight / 2), zoomedWidth, zoomedHeight), currentImage, sourceRect); }