Skip to content

Commit 8b0c6dd

Browse files
fix(gui): "lay flat" vtf preview mode ignores alpha transparency checkbox
1 parent 80ca16f commit 8b0c6dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/previews/VTFPreview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void VTFWidget::paintEvent(QPaintEvent*) {
218218
if (!imageData.empty()) {
219219
QImage currentImage(reinterpret_cast<uchar*>(imageData.data()), static_cast<int>(this->vtf->getWidth(this->currentMip)), static_cast<int>(this->vtf->getHeight(this->currentMip)), QImage::Format_RGBA8888);
220220
if (!this->alphaEnabled) {
221-
this->image = this->image.convertedTo(QImage::Format_RGB888);
221+
currentImage = currentImage.convertedTo(QImage::Format_RGB888);
222222
}
223223
painter.drawImage(QRect(zoomedXPos + (zoomedWidth * face) - (totalZoomedWidth / 2), zoomedYPos + (zoomedHeight * frame) - (totalZoomedHeight / 2), zoomedWidth, zoomedHeight), currentImage, sourceRect);
224224
}

0 commit comments

Comments
 (0)