--- a/src/gui/widgets/qtoolbarlayout.cpp Tue Jan 26 12:42:25 2010 +0200
+++ b/src/gui/widgets/qtoolbarlayout.cpp Tue Feb 02 00:43:10 2010 +0200
@@ -642,7 +642,7 @@
return result;
}
-void QToolBarLayout::setExpanded(bool exp, bool animated)
+void QToolBarLayout::setExpanded(bool exp)
{
if (exp == expanded)
return;
@@ -654,7 +654,7 @@
if (!tb)
return;
if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) {
- animating = true;
+ animating = !tb->isWindow() && win->isAnimated();
QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout());
if (expanded) {
tb->raise();
@@ -665,7 +665,7 @@
layoutActions(rect.size());
}
}
- layout->layoutState.toolBarAreaLayout.apply(animated);
+ layout->layoutState.toolBarAreaLayout.apply(animating);
}
}