Skip to content

Commit

Permalink
Fix tabs not being active when restoring state (githubuser0xFFFF#101)
Browse files Browse the repository at this point in the history
Regression introduced by 29ebc83
  • Loading branch information
nairaner authored Jan 31, 2020
1 parent 024ac43 commit db641d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DockAreaTabBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit db641d1

Please sign in to comment.