From 52fc5904e0d960263efd112c99e737647e08382c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 30 Aug 2016 14:54:35 +0200 Subject: [PATCH] Fix that welcome mode was no longer shown at startup Even though the tab was selected. Broke with e440e344ca0f831d4c0ba8d4548082e70170888e and abcdadd40ec9aac7374c3b01cbd686d808eca0bc . We need to update the current index when tabs/modes are inserted before it. Change-Id: I26b5252d365c0108584534bcb0ee1aacc3eacce3 Reviewed-by: Christian Stenger Reviewed-by: Ulf Hermann Reviewed-by: Tobias Hunger --- src/plugins/coreplugin/fancytabwidget.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/coreplugin/fancytabwidget.h b/src/plugins/coreplugin/fancytabwidget.h index f75dfdf271a..e6a871ea4ea 100644 --- a/src/plugins/coreplugin/fancytabwidget.h +++ b/src/plugins/coreplugin/fancytabwidget.h @@ -98,6 +98,8 @@ public: tab->text = label; tab->hasMenu = hasMenu; m_tabs.insert(index, tab); + if (m_currentIndex >= index) + ++m_currentIndex; updateGeometry(); } void setEnabled(int index, bool enabled);