From 1fbcab67a0dcf53825fa913868a739c122a1bb87 Mon Sep 17 00:00:00 2001 From: Janos Pantos Date: Thu, 2 Nov 2017 18:20:29 +0100 Subject: [PATCH] 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. --- qrenderdoc/Windows/TextureViewer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index 39b7cb492..8dc94e067 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -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