From e61794dd88b3d2d786585c4720141f0541320963 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 1 Sep 2020 10:27:45 +0100 Subject: [PATCH] Don't forcibly change tab in texture viewer when one is closed --- qrenderdoc/Windows/TextureViewer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index fe9488b48..26ee186f7 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -1985,9 +1985,6 @@ void TextureViewer::textureTab_Closing(int index) for(ResourceId id : ids) m_LockedTabs.remove(id); - textureTabs->setCurrentIndex(index - 1); - textureTabs->widget(index - 1)->show(); - return; } @@ -1995,8 +1992,8 @@ void TextureViewer::textureTab_Closing(int index) qCritical() << "Somehow closing dynamic tab?"; if(textureTabs->count() > 1) { - textureTabs->setCurrentIndex(1); - textureTabs->widget(1)->show(); + textureTabs->setCurrentIndex(0); + textureTabs->widget(0)->show(); } }