From d4c179c48e15502eac13f5d049c759136299c8af Mon Sep 17 00:00:00 2001 From: Krzysztof Machura Date: Fri, 31 Jan 2020 14:26:02 +0100 Subject: [PATCH] Fix tabs not being active when restoring state (#101) Regression introduced by 29ebc83b351932598ae83f47205c4d09bb852b47 --- src/DockAreaTabBar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DockAreaTabBar.cpp b/src/DockAreaTabBar.cpp index b109bbe..f70f75b 100644 --- a/src/DockAreaTabBar.cpp +++ b/src/DockAreaTabBar.cpp @@ -345,7 +345,7 @@ void CDockAreaTabBar::insertTab(int Index, CDockWidgetTab* Tab) connect(Tab, SIGNAL(moved(const QPoint&)), this, SLOT(onTabWidgetMoved(const QPoint&))); Tab->installEventFilter(this); emit tabInserted(Index); - if (Index <= d->CurrentIndex) + if (Index <= d->CurrentIndex || d->CurrentIndex == -1) { setCurrentIndex(d->CurrentIndex + 1); }