From b40732d7abc350b4faca7d45e44d79214f4e9ada Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 4 Jan 2009 18:43:30 +0000 Subject: [PATCH] don't change the current tab again, otherwise current==old and bad things happen ;) svn path=/trunk/KDE/kdelibs/; revision=905635 --- widgets/tabbar.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/widgets/tabbar.cpp b/widgets/tabbar.cpp index 8aa2cfdf8..5360e9aa2 100644 --- a/widgets/tabbar.cpp +++ b/widgets/tabbar.cpp @@ -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];