When a custom name is changed, refresh the UI to propagate it properly

This commit is contained in:
baldurk
2017-11-17 16:30:54 +00:00
parent 7c8628b237
commit 2ac0802b10
14 changed files with 117 additions and 27 deletions
+12 -6
View File
@@ -1386,6 +1386,8 @@ void BufferViewer::OnEventChanged(uint32_t eventID)
m_ModelVSOut->secondaryName(), m_ModelGSOut->posName(), m_ModelGSOut->secondaryName(),
};
updateWindowTitle();
const DrawcallDescription *draw = m_Ctx.CurDrawcall();
configureDrawRange();
@@ -2597,12 +2599,11 @@ void BufferViewer::ViewBuffer(uint64_t byteOffset, uint64_t byteSize, ResourceId
m_ByteSize = byteSize;
m_BufferID = id;
updateWindowTitle();
BufferDescription *buf = m_Ctx.GetBuffer(id);
if(buf)
{
setWindowTitle(m_Ctx.GetResourceName(id) + lit(" - Contents"));
m_ObjectByteSize = buf->length;
}
processFormat(format);
}
@@ -2617,16 +2618,21 @@ void BufferViewer::ViewTexture(uint32_t arrayIdx, uint32_t mip, ResourceId id, c
m_TexMip = mip;
m_BufferID = id;
updateWindowTitle();
TextureDescription *tex = m_Ctx.GetTexture(id);
if(tex)
{
setWindowTitle(m_Ctx.GetResourceName(id) + lit(" - Contents"));
m_ObjectByteSize = tex->byteSize;
}
processFormat(format);
}
void BufferViewer::updateWindowTitle()
{
if(!m_MeshView)
setWindowTitle(m_Ctx.GetResourceName(m_BufferID) + lit(" - Contents"));
}
void BufferViewer::render_mouseWheel(QWheelEvent *e)
{
if(m_CurrentCamera)