update the current index when inserting tabs

svn path=/trunk/KDE/kdelibs/; revision=1026753
This commit is contained in:
Marco Martin 2009-09-22 14:04:20 +00:00
parent b16ed00bc4
commit eedf3c47ff

View File

@ -280,6 +280,7 @@ int TabBar::insertTab(int index, const QIcon &icon, const QString &label,
d->updateTabWidgetMode();
int actualIndex = d->tabProxy->native->insertTab(index, icon, label);
d->currentIndex = d->tabProxy->native->currentIndex();
d->tabProxy->setPreferredSize(d->tabProxy->native->sizeHint());
d->updateTabWidgetMode();
return actualIndex;