From 5e1469b0d80380dbe7f89b2400ad539093891e89 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Tue, 28 May 2024 20:17:57 +0200 Subject: [PATCH] Don't restore last opened tab if that tab is no longer visible --- lib/utils/tab-helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/tab-helpers.cpp b/lib/utils/tab-helpers.cpp index e0971e56..32db2120 100644 --- a/lib/utils/tab-helpers.cpp +++ b/lib/utils/tab-helpers.cpp @@ -161,7 +161,7 @@ void SetTabOrder(QTabWidget *tabWidget) void SetCurrentTab(QTabWidget *tabWidget) { - if (lastOpenedTab >= 0) { + if (lastOpenedTab >= 0 && tabWidget->isTabVisible(lastOpenedTab)) { tabWidget->setCurrentIndex(lastOpenedTab); } }