summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-02-18 15:21:42 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-02-18 15:32:42 (GMT)
commit059be19781a22d2e41f22072152589857d0fabf9 (patch)
tree2b63c9ae9f5b192a3254cf3a7e5b0fb0781dac29
parentb37def83cb97dec7167f99a53dfada1b48dee59c (diff)
downloadQt-059be19781a22d2e41f22072152589857d0fabf9.zip
Qt-059be19781a22d2e41f22072152589857d0fabf9.tar.gz
Qt-059be19781a22d2e41f22072152589857d0fabf9.tar.bz2
Fixed a regression in dockwidgets that would jump when toplevel resized
This was reproducible when the main window doesn't contain a central widget. Task-number: QTBUG-8107 Reviewed-by: ogoffart
-rw-r--r--src/gui/widgets/qdockarealayout.cpp2
-rw-r--r--src/gui/widgets/qmainwindowlayout.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index d754800..0c39f42 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -2635,7 +2635,7 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> *_ver_struct_list,
QSize bottom_max = docks[QInternal::BottomDock].maximumSize();
bottom_hint = bottom_hint.boundedTo(bottom_max).expandedTo(bottom_min);
- fallbackToSizeHints = !have_central;
+ fallbackToSizeHints = false;
if (_ver_struct_list != 0) {
QVector<QLayoutStruct> &ver_struct_list = *_ver_struct_list;
diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp
index fc75c92..593e391 100644
--- a/src/gui/widgets/qmainwindowlayout.cpp
+++ b/src/gui/widgets/qmainwindowlayout.cpp
@@ -1772,6 +1772,7 @@ void QMainWindowLayout::setCentralWidget(QWidget *widget)
if (savedState.isValid()) {
#ifndef QT_NO_DOCKWIDGET
savedState.dockAreaLayout.centralWidgetItem = layoutState.dockAreaLayout.centralWidgetItem;
+ savedState.dockAreaLayout.fallbackToSizeHints = true;
#else
savedState.centralWidgetItem = layoutState.centralWidgetItem;
#endif