don't change the current tab again, otherwise current==old and bad things happen ;)

svn path=/trunk/KDE/kdelibs/; revision=905635
This commit is contained in:
Aaron J. Seigo 2009-01-04 18:43:30 +00:00
parent 1daf22596d
commit b40732d7ab

View File

@ -282,14 +282,13 @@ void TabBar::resizeEvent(QGraphicsSceneResizeEvent * event)
void TabBar::setCurrentIndex(int index)
{
if (index > d->tabProxy->native->count() || d->tabProxy->native->count() <= 1) {
if (index > d->tabProxy->native->count() ||
d->tabProxy->native->count() <= 1 ||
d->currentIndex == index) {
return;
}
if (d->currentIndex != index) {
d->tabProxy->native->setCurrentIndex(index);
}
d->tabProxy->native->setCurrentIndex(index);
d->tabWidgetLayout->removeAt(1);
d->oldPage = d->pages[d->currentIndex];