diff options
author | Martin Smith <msmith@trolltech.com> | 2009-12-04 14:02:35 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2009-12-04 14:02:35 (GMT) |
commit | 33441e2a611f07207b0b942368aab9010cdf8ab1 (patch) | |
tree | 77a223255bab621549f340c86fe19005f1ebbc62 /src/gui/widgets/qdockarealayout.cpp | |
parent | 77f274672480e5980d9f42e4fd94c9770279543b (diff) | |
parent | b6cf9e28c2fef9112789e98ac9d1eda45a407889 (diff) | |
download | Qt-33441e2a611f07207b0b942368aab9010cdf8ab1.zip Qt-33441e2a611f07207b0b942368aab9010cdf8ab1.tar.gz Qt-33441e2a611f07207b0b942368aab9010cdf8ab1.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'src/gui/widgets/qdockarealayout.cpp')
-rw-r--r-- | src/gui/widgets/qdockarealayout.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index 07914b2..0a26a77 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -1167,7 +1167,8 @@ bool QDockAreaLayoutInfo::insertGap(const QList<int> &path, QLayoutItem *dockWid QDockAreaLayoutInfo *subinfo = item.subinfo; QLayoutItem *widgetItem = item.widgetItem; - QRect r = subinfo == 0 ? dockedGeometry(widgetItem->widget()) : subinfo->rect; + QPlaceHolderItem *placeHolderItem = item.placeHolderItem; + QRect r = subinfo == 0 ? widgetItem ? dockedGeometry(widgetItem->widget()) : placeHolderItem->topLevelRect : subinfo->rect; Qt::Orientation opposite = o == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal; #ifdef QT_NO_TABBAR @@ -1176,13 +1177,15 @@ bool QDockAreaLayoutInfo::insertGap(const QList<int> &path, QLayoutItem *dockWid QDockAreaLayoutInfo *new_info = new QDockAreaLayoutInfo(sep, dockPos, opposite, tabBarShape, mainWindow); + //item become a new top-level item.subinfo = new_info; item.widgetItem = 0; + item.placeHolderItem = 0; QDockAreaLayoutItem new_item = widgetItem == 0 ? QDockAreaLayoutItem(subinfo) - : QDockAreaLayoutItem(widgetItem); + : widgetItem ? QDockAreaLayoutItem(widgetItem) : QDockAreaLayoutItem(placeHolderItem); new_item.size = pick(opposite, r.size()); new_item.pos = pick(opposite, r.topLeft()); new_info->item_list.append(new_item); |