don't explode on setCurrentIndex(index<0)

svn path=/trunk/KDE/kdelibs/; revision=1027763
This commit is contained in:
Marco Martin 2009-09-24 17:57:53 +00:00
parent 376e23e095
commit 1ae2f714bb

View File

@ -327,6 +327,13 @@ void TabBar::setCurrentIndex(int index)
d->tabWidgetLayout->removeAt(1);
if (index < 0) {
d->currentIndex = index;
emit currentChanged(index);
d->tabProxy->native->setCurrentIndex(index);
return;
}
d->oldPage = d->pages[d->currentIndex];
d->newPage = d->pages[index];