save the state of tabBarShown: prevents tabbar to reappear when it shouldn't

svn path=/trunk/KDE/kdelibs/; revision=1177838
This commit is contained in:
Marco Martin 2010-09-21 12:19:43 +00:00
parent b630dc66ff
commit 8e5a2533b5

View File

@ -77,7 +77,8 @@ public:
tabWidgetMode(true), tabWidgetMode(true),
oldPageAnimId(-1), oldPageAnimId(-1),
newPageAnimId(-1), newPageAnimId(-1),
customFont(false) customFont(false),
tabBarShown(true)
{ {
} }
@ -109,12 +110,17 @@ public:
Animation *newPageAnim; Animation *newPageAnim;
QParallelAnimationGroup *animGroup; QParallelAnimationGroup *animGroup;
bool customFont; bool customFont;
bool tabBarShown;
QWeakPointer<QGraphicsWidget> firstPositionWidget; QWeakPointer<QGraphicsWidget> firstPositionWidget;
QWeakPointer<QGraphicsWidget> lastPositionWidget; QWeakPointer<QGraphicsWidget> lastPositionWidget;
}; };
void TabBarPrivate::updateTabWidgetMode() void TabBarPrivate::updateTabWidgetMode()
{ {
if (!tabBarShown) {
return;
}
bool tabWidget = false; bool tabWidget = false;
foreach (QGraphicsWidget *page, pages) { foreach (QGraphicsWidget *page, pages) {
@ -571,6 +577,7 @@ void TabBar::setTabBarShown(bool show)
if (!show && !d->tabWidgetMode) { if (!show && !d->tabWidgetMode) {
return; return;
} }
d->tabBarShown = show;
if (!show && d->tabProxy->isVisible()) { if (!show && d->tabProxy->isVisible()) {
d->tabProxy->hide(); d->tabProxy->hide();