From a5ccb23ebd89d64cd53f83bbb2ac324672448411 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 9 Dec 2009 19:19:00 +0000 Subject: [PATCH] it appears is necessary to resize the new page 2 times for it to take effect, invalidating the layout doesn't seem to be enough svn path=/trunk/KDE/kdelibs/; revision=1060726 --- widgets/tabbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/tabbar.cpp b/widgets/tabbar.cpp index 8dc43fa0b..61bdb1a42 100644 --- a/widgets/tabbar.cpp +++ b/widgets/tabbar.cpp @@ -346,10 +346,6 @@ void TabBar::setCurrentIndex(int index) d->newPage = 0; } - if (d->newPage && d->oldPage) { - d->newPage->resize(d->oldPage->size()); - } - setFlags(QGraphicsItem::ItemClipsChildrenToShape); //if an animation was in rogress hide everything to avoid an inconsistent state @@ -376,6 +372,10 @@ void TabBar::setCurrentIndex(int index) } if (d->newPage && d->oldPage) { + //FIXME: it seems necessary to resiz the thing 2 times to have effect + d->newPage->resize(1,1); + d->newPage->resize(d->oldPage->size()); + QRect beforeCurrentGeom(d->oldPage->geometry().toRect()); beforeCurrentGeom.moveTopRight(beforeCurrentGeom.topLeft());