mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix texture saving not propagating the right settings
This commit is contained in:
@@ -77,11 +77,17 @@ TextureSaveDialog::TextureSaveDialog(const TextureDescription &t, const TextureS
|
||||
ui->mipSelect->addItem(
|
||||
QFormatStr("%1 - %2x%3").arg(i).arg(qMax(1U, tex.width >> i)).arg(qMax(1U, tex.height >> i)));
|
||||
|
||||
// reset as it might have been changed by adding items
|
||||
saveData.mip = s.mip;
|
||||
|
||||
ui->mipSelect->setCurrentIndex(saveData.mip >= 0 ? saveData.mip : 0);
|
||||
|
||||
for(uint32_t i = 0; i < tex.msSamp; i++)
|
||||
ui->sampleSelect->addItem(tr("Sample %1").arg(i));
|
||||
|
||||
// reset as it might have been changed by adding items
|
||||
saveData.sample = s.sample;
|
||||
|
||||
ui->sampleSelect->setCurrentIndex(qMin(
|
||||
(int)tex.msSamp, (saveData.sample.sampleIndex == ~0U ? 0 : (int)saveData.sample.sampleIndex)));
|
||||
|
||||
@@ -114,6 +120,9 @@ TextureSaveDialog::TextureSaveDialog(const TextureDescription &t, const TextureS
|
||||
}
|
||||
}
|
||||
|
||||
// reset as it might have been changed by adding items
|
||||
saveData.slice = s.slice;
|
||||
|
||||
ui->sliceSelect->setCurrentIndex(saveData.slice.sliceIndex >= 0 ? saveData.slice.sliceIndex : 0);
|
||||
|
||||
ui->gridWidth->setMaximum(tex.depth * tex.arraysize * tex.msSamp);
|
||||
|
||||
@@ -3337,6 +3337,7 @@ void TextureViewer::on_saveTex_clicked()
|
||||
|
||||
TextureSave config;
|
||||
memset(&config, 0, sizeof(config));
|
||||
config.jpegQuality = 90;
|
||||
|
||||
config.id = m_TexDisplay.texid;
|
||||
config.typeHint = m_TexDisplay.typeHint;
|
||||
|
||||
Reference in New Issue
Block a user