diff options
Diffstat (limited to 'src/gui/widgets/qdockarealayout.cpp')
-rw-r--r-- | src/gui/widgets/qdockarealayout.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index 953edab..07914b2 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -1931,9 +1931,6 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*> item_list.append(item); } else { QDockAreaLayoutItem item(new QDockWidgetItem(widget)); - if (!testing) { - item_list.append(item); - } if (flags & StateFlagFloating) { bool drawer = false; #ifdef Q_WS_MAC // drawer support @@ -1971,11 +1968,13 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*> if (!testing) { widget->setVisible(flags & StateFlagVisible); + item_list.append(item); } } else { int dummy; stream >> item.pos >> item.size >> dummy >> dummy; if (!testing) { + item_list.append(item); widget->setFloating(false); widget->setVisible(flags & StateFlagVisible); emit widget->dockLocationChanged(toDockWidgetArea(dockPos)); |