Skip to content

Commit

Permalink
fix(gui): "lay flat" vtf preview mode ignores alpha transparency chec…
Browse files Browse the repository at this point in the history
…kbox
  • Loading branch information
craftablescience committed Jun 6, 2024
1 parent 80ca16f commit 8b0c6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/previews/VTFPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void VTFWidget::paintEvent(QPaintEvent*) {
if (!imageData.empty()) {
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);
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);
}
Expand Down

0 comments on commit 8b0c6dd

Please sign in to comment.