mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Disable change events of mipLevel and sliceFace when switching textures
Otherwise, bad texture queries may occur, which refer to mip and slice values of the previous texture.
This commit is contained in:
committed by
Baldur Karlsson
parent
ad026925a6
commit
1fbcab67a0
@@ -1127,6 +1127,10 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
|
||||
UI_UpdateStatusText();
|
||||
|
||||
// block signals for mipLevel and sliceFace comboboxes while editing them
|
||||
ui->mipLevel->blockSignals(true);
|
||||
ui->sliceFace->blockSignals(true);
|
||||
|
||||
ui->mipLevel->clear();
|
||||
|
||||
m_TexDisplay.mip = 0;
|
||||
@@ -1239,6 +1243,10 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw)
|
||||
m_PrevFirstArraySlice = firstArraySlice;
|
||||
}
|
||||
|
||||
// enable signals for mipLevel and sliceFace
|
||||
ui->mipLevel->blockSignals(false);
|
||||
ui->sliceFace->blockSignals(false);
|
||||
|
||||
// because slice and mip are specially set above, we restore any per-tex settings to apply
|
||||
// even if we don't switch to a new texture.
|
||||
// Note that if the slice or mip was changed because that slice or mip is the selected one
|
||||
|
||||
Reference in New Issue
Block a user