Fix tabs not being active when restoring state (#101)

Regression introduced by 29ebc83b35
This commit is contained in:
Krzysztof Machura 2020-01-31 14:26:02 +01:00 committed by GitHub
parent ff68ad95a6
commit d4c179c48e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -345,7 +345,7 @@ void CDockAreaTabBar::insertTab(int Index, CDockWidgetTab* Tab)
connect(Tab, SIGNAL(moved(const QPoint&)), this, SLOT(onTabWidgetMoved(const QPoint&))); connect(Tab, SIGNAL(moved(const QPoint&)), this, SLOT(onTabWidgetMoved(const QPoint&)));
Tab->installEventFilter(this); Tab->installEventFilter(this);
emit tabInserted(Index); emit tabInserted(Index);
if (Index <= d->CurrentIndex) if (Index <= d->CurrentIndex || d->CurrentIndex == -1)
{ {
setCurrentIndex(d->CurrentIndex + 1); setCurrentIndex(d->CurrentIndex + 1);
} }