diff --git a/AdvancedDockingSystem/src/ContainerWidget.cpp b/AdvancedDockingSystem/src/ContainerWidget.cpp index fcb2543..6d05692 100644 --- a/AdvancedDockingSystem/src/ContainerWidget.cpp +++ b/AdvancedDockingSystem/src/ContainerWidget.cpp @@ -137,6 +137,7 @@ QByteArray ContainerWidget::saveState() const FloatingWidget* fw = _floatings.at(i); out << fw->content()->uniqueName(); out << fw->saveGeometry(); + out << fw->isVisible(); } // Walk through layout for splitters @@ -495,7 +496,9 @@ bool ContainerWidget::restoreFloatingWidgets(QDataStream& in, QList> uname; QByteArray geom; in >> geom; - qDebug() << "Restore FloatingWidget" << uname << geom; + bool visible = false; + in >> visible; + qDebug() << "Restore FloatingWidget" << uname << geom << visible; const SectionContent::RefPtr sc = SectionContent::LookupMapByName.value(uname).toStrongRef(); if (!sc) @@ -510,9 +513,9 @@ bool ContainerWidget::restoreFloatingWidgets(QDataStream& in, QListrestoreGeometry(geom); - fw->setVisible(true); - data.titleWidget->_fw = fw; // $mfreiholz: Don't look at it :-< It's more than ugly... + fw->setVisible(visible); floatings.append(fw); + data.titleWidget->_fw = fw; // $mfreiholz: Don't look at it :-< It's more than ugly... } return true; }