mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 00:05:41 -05:00
Don't restore last opened tab if that tab is no longer visible
This commit is contained in:
@@ -161,7 +161,7 @@ void SetTabOrder(QTabWidget *tabWidget)
|
||||
|
||||
void SetCurrentTab(QTabWidget *tabWidget)
|
||||
{
|
||||
if (lastOpenedTab >= 0) {
|
||||
if (lastOpenedTab >= 0 && tabWidget->isTabVisible(lastOpenedTab)) {
|
||||
tabWidget->setCurrentIndex(lastOpenedTab);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user