diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-01 15:53:59 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:25:01 (GMT) |
commit | 8242b1447998f51639d1e21417c31fe0d428a539 (patch) | |
tree | 9b165a882e2411c9c58653012ae6cdf4a8133ee9 /src/gui | |
parent | 02d69838948535e5c79a0883be3727c542f28fb2 (diff) | |
download | Qt-8242b1447998f51639d1e21417c31fe0d428a539.zip Qt-8242b1447998f51639d1e21417c31fe0d428a539.tar.gz Qt-8242b1447998f51639d1e21417c31fe0d428a539.tar.bz2 |
Fixed a problem with toolbars not relayouting
This could happen when dragging an extended toolbar from a mainwindow
PAtch was provided on IRC by ravek (#dev)
Task-number: QTBUG-10920
Reviewed-by: Trust-Me
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qtoolbarlayout.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp index 98b1fc5..971fdda 100644 --- a/src/gui/widgets/qtoolbarlayout.cpp +++ b/src/gui/widgets/qtoolbarlayout.cpp @@ -647,15 +647,15 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const void QToolBarLayout::setExpanded(bool exp) { - if (exp == expanded) + QWidget *tb = qobject_cast<QToolBar*>(parentWidget()); + if (!tb) + return; + if (exp == expanded && !tb->isWindow()) return; expanded = exp; extension->setChecked(expanded); - QToolBar *tb = qobject_cast<QToolBar*>(parentWidget()); - if (!tb) - return; if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) { #ifdef QT_NO_DOCKWIDGET animating = false; |