From afb5abd6357a981b0ca07dedb3dbaeaa0fe45097 Mon Sep 17 00:00:00 2001 From: mfreiholz Date: Wed, 9 Mar 2016 08:07:16 +0100 Subject: [PATCH] Fixes invisible FloatingWidget's title-widget after restoring state. --- AdvancedDockingSystem/src/ContainerWidget.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/AdvancedDockingSystem/src/ContainerWidget.cpp b/AdvancedDockingSystem/src/ContainerWidget.cpp index 310a228..ac4d9b6 100644 --- a/AdvancedDockingSystem/src/ContainerWidget.cpp +++ b/AdvancedDockingSystem/src/ContainerWidget.cpp @@ -111,10 +111,13 @@ bool ContainerWidget::showSectionContent(const SectionContent::RefPtr& sc) // Search SC in floatings for (int i = 0; i < _floatings.count(); ++i) { - const bool found = _floatings.at(i)->content()->uid() == sc->uid(); + FloatingWidget* fw = _floatings.at(i); + const bool found = fw->content()->uid() == sc->uid(); if (!found) continue; - _floatings.at(i)->setVisible(true); + fw->setVisible(true); + fw->_titleWidget->setVisible(true); + fw->_contentWidget->setVisible(true); return true; } @@ -297,9 +300,9 @@ QMenu* ContainerWidget::createContextMenu() const a->setCheckable(true); a->setChecked(fw->isVisible()); #if QT_VERSION >= 0x050000 - QObject::connect(a, &QAction::toggled, fw, &FloatingWidget::setVisible); + QObject::connect(a, &QAction::toggled, this, &ContainerWidget::onActionToggleSectionContentVisibility); #else - QObject::connect(a, SIGNAL(toggled(bool)), fw, SLOT(setVisible(bool))); + QObject::connect(a, SIGNAL(toggled(bool)), this, SLOT(onActionToggleSectionContentVisibility(bool))); #endif actions.insert(a->text(), a); }