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
+15
View File
@@ -2561,6 +2561,16 @@ void TextureViewer::OnEventChanged(uint32_t eventID)
UI_CreateThumbnails();
UI_UpdateTextureDetails();
refreshTextureList();
// iterate over locked tabs, and update the name if it's changed
for(QWidget *w : m_LockedTabs.values())
{
ResourceId id = w->property("id").value<ResourceId>();
w->setWindowTitle(m_Ctx.GetResourceName(id));
}
QVector<BoundResource> RTs = Following::GetOutputTargets(m_Ctx);
BoundResource Depth = Following::GetDepthTarget(m_Ctx);
@@ -3450,6 +3460,11 @@ void TextureViewer::on_textureListFilter_editTextChanged(const QString &text)
}
void TextureViewer::on_textureListFilter_currentIndexChanged(int index)
{
refreshTextureList();
}
void TextureViewer::refreshTextureList()
{
TextureListItemModel *model = (TextureListItemModel *)ui->textureList->model();