mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
When a custom name is changed, refresh the UI to propagate it properly
This commit is contained in:
@@ -562,14 +562,9 @@ PixelHistoryView::PixelHistoryView(ICaptureContext &ctx, ResourceId id, QPoint p
|
||||
|
||||
m_Pixel = point;
|
||||
m_Display = display;
|
||||
m_ID = id;
|
||||
|
||||
TextureDescription *tex = m_Ctx.GetTexture(id);
|
||||
|
||||
QString title =
|
||||
tr("Pixel History on %1 for (%2, %3)").arg(m_Ctx.GetResourceName(id)).arg(point.x()).arg(point.y());
|
||||
if(tex->msSamp > 1)
|
||||
title += tr(" @ Sample %1").arg(display.sampleIdx);
|
||||
setWindowTitle(title);
|
||||
updateWindowTitle();
|
||||
|
||||
QString channelStr;
|
||||
if(display.Red)
|
||||
@@ -614,6 +609,20 @@ PixelHistoryView::PixelHistoryView(ICaptureContext &ctx, ResourceId id, QPoint p
|
||||
m_Ctx.AddLogViewer(this);
|
||||
}
|
||||
|
||||
void PixelHistoryView::updateWindowTitle()
|
||||
{
|
||||
QString title = tr("Pixel History on %1 for (%2, %3)")
|
||||
.arg(m_Ctx.GetResourceName(m_ID))
|
||||
.arg(m_Pixel.x())
|
||||
.arg(m_Pixel.y());
|
||||
|
||||
TextureDescription *tex = m_Ctx.GetTexture(m_ID);
|
||||
if(tex->msSamp > 1)
|
||||
title += tr(" @ Sample %1").arg(m_Display.sampleIdx);
|
||||
|
||||
setWindowTitle(title);
|
||||
}
|
||||
|
||||
PixelHistoryView::~PixelHistoryView()
|
||||
{
|
||||
disableTimelineHighlight();
|
||||
@@ -654,6 +663,11 @@ void PixelHistoryView::OnLogfileClosed()
|
||||
ToolWindowManager::closeToolWindow(this);
|
||||
}
|
||||
|
||||
void PixelHistoryView::OnEventChanged(uint32_t eventID)
|
||||
{
|
||||
updateWindowTitle();
|
||||
}
|
||||
|
||||
void PixelHistoryView::SetHistory(const rdcarray<PixelModification> &history)
|
||||
{
|
||||
m_Model->setHistory(history);
|
||||
|
||||
Reference in New Issue
Block a user