Fix order, update texture before fetching histogram. Closes #2828

* This is only relevant when using a custom shader since otherwise nothing is
  'updated', though could also affect overlays potentially. If we don't then the
  custom shader texture may not have been re-rendered before we fetch the
  histogram data and we'll get stale information.
This commit is contained in:
baldurk
2023-01-25 10:38:16 +00:00
parent 4e02449617
commit b8b9fff7f0
+6 -6
View File
@@ -1581,12 +1581,12 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newAction)
AutoFitRange();
m_Ctx.Replay().AsyncInvoke([this](IReplayController *r) {
RT_UpdateVisualRange(r);
RT_UpdateAndDisplay(r);
if(m_Output != NULL)
RT_PickPixelsAndUpdate(r);
RT_UpdateVisualRange(r);
});
HighlightUsage();
@@ -3815,14 +3815,14 @@ void TextureViewer::on_mipLevel_currentIndexChanged(int index)
return;
}
INVOKE_MEMFN(RT_UpdateVisualRange);
INVOKE_MEMFN(RT_UpdateAndDisplay);
if(m_Output != NULL && m_PickedPoint.x() >= 0 && m_PickedPoint.y() >= 0)
{
INVOKE_MEMFN(RT_PickPixelsAndUpdate);
}
INVOKE_MEMFN(RT_UpdateAndDisplay);
INVOKE_MEMFN(RT_UpdateVisualRange);
}
void TextureViewer::on_sliceFace_currentIndexChanged(int index)
@@ -3834,14 +3834,14 @@ void TextureViewer::on_sliceFace_currentIndexChanged(int index)
TextureDescription &tex = *texptr;
m_TexDisplay.subresource.slice = (uint32_t)qMax(0, index);
INVOKE_MEMFN(RT_UpdateAndDisplay);
INVOKE_MEMFN(RT_UpdateVisualRange);
if(m_Output != NULL && m_PickedPoint.x() >= 0 && m_PickedPoint.y() >= 0)
{
INVOKE_MEMFN(RT_PickPixelsAndUpdate);
}
INVOKE_MEMFN(RT_UpdateAndDisplay);
}
void TextureViewer::on_locationGoto_clicked()