diff options
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; |