mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 15:41:34 +08:00
Fixes invisible FloatingWidget's title-widget after restoring state.
This commit is contained in:
parent
34cf851e24
commit
afb5abd635
@ -111,10 +111,13 @@ bool ContainerWidget::showSectionContent(const SectionContent::RefPtr& sc)
|
|||||||
// Search SC in floatings
|
// Search SC in floatings
|
||||||
for (int i = 0; i < _floatings.count(); ++i)
|
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)
|
if (!found)
|
||||||
continue;
|
continue;
|
||||||
_floatings.at(i)->setVisible(true);
|
fw->setVisible(true);
|
||||||
|
fw->_titleWidget->setVisible(true);
|
||||||
|
fw->_contentWidget->setVisible(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,9 +300,9 @@ QMenu* ContainerWidget::createContextMenu() const
|
|||||||
a->setCheckable(true);
|
a->setCheckable(true);
|
||||||
a->setChecked(fw->isVisible());
|
a->setChecked(fw->isVisible());
|
||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
QObject::connect(a, &QAction::toggled, fw, &FloatingWidget::setVisible);
|
QObject::connect(a, &QAction::toggled, this, &ContainerWidget::onActionToggleSectionContentVisibility);
|
||||||
#else
|
#else
|
||||||
QObject::connect(a, SIGNAL(toggled(bool)), fw, SLOT(setVisible(bool)));
|
QObject::connect(a, SIGNAL(toggled(bool)), this, SLOT(onActionToggleSectionContentVisibility(bool)));
|
||||||
#endif
|
#endif
|
||||||
actions.insert(a->text(), a);
|
actions.insert(a->text(), a);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user