Fix that welcome mode was no longer shown at startup

Even though the tab was selected. Broke with
e440e344ca and
abcdadd40e .
We need to update the current index when tabs/modes are inserted before
it.

Change-Id: I26b5252d365c0108584534bcb0ee1aacc3eacce3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2016-08-30 14:54:35 +02:00
parent 4c197a6cca
commit 52fc5904e0

View File

@@ -98,6 +98,8 @@ public:
tab->text = label; tab->text = label;
tab->hasMenu = hasMenu; tab->hasMenu = hasMenu;
m_tabs.insert(index, tab); m_tabs.insert(index, tab);
if (m_currentIndex >= index)
++m_currentIndex;
updateGeometry(); updateGeometry();
} }
void setEnabled(int index, bool enabled); void setEnabled(int index, bool enabled);