mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
Some small coding style fixes
This commit is contained in:
parent
1d90e8e823
commit
b15bc26a63
@ -759,7 +759,6 @@ void CDockManager::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
// Fix Issue #380
|
// Fix Issue #380
|
||||||
restoreHiddenFloatingWidgets();
|
restoreHiddenFloatingWidgets();
|
||||||
|
|
||||||
if (d->UninitializedFloatingWidgets.empty())
|
if (d->UninitializedFloatingWidgets.empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -777,8 +776,15 @@ void CDockManager::showEvent(QShowEvent *event)
|
|||||||
d->UninitializedFloatingWidgets.clear();
|
d->UninitializedFloatingWidgets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
void CDockManager::restoreHiddenFloatingWidgets()
|
void CDockManager::restoreHiddenFloatingWidgets()
|
||||||
{
|
{
|
||||||
|
if (d->HiddenFloatingWidgets.isEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Restore floating widgets that were hidden upon hideManagerAndFloatingWidgets
|
// Restore floating widgets that were hidden upon hideManagerAndFloatingWidgets
|
||||||
for (auto FloatingWidget : d->HiddenFloatingWidgets)
|
for (auto FloatingWidget : d->HiddenFloatingWidgets)
|
||||||
{
|
{
|
||||||
@ -788,18 +794,20 @@ void CDockManager::restoreHiddenFloatingWidgets()
|
|||||||
// Could make sense to move this to CFloatingDockContainer::showEvent(QShowEvent *event)
|
// Could make sense to move this to CFloatingDockContainer::showEvent(QShowEvent *event)
|
||||||
// if experiencing CFloatingDockContainer being shown empty in other situations, but let's keep
|
// if experiencing CFloatingDockContainer being shown empty in other situations, but let's keep
|
||||||
// it here for now to make sure changes to fix Issue #380 does not impact existing behaviours
|
// it here for now to make sure changes to fix Issue #380 does not impact existing behaviours
|
||||||
for ( auto dockWidget : FloatingWidget->dockWidgets() )
|
for (auto dockWidget : FloatingWidget->dockWidgets())
|
||||||
{
|
{
|
||||||
if ( dockWidget->toggleViewAction()->isChecked() )
|
if (dockWidget->toggleViewAction()->isChecked())
|
||||||
{
|
{
|
||||||
dockWidget->toggleView(true);
|
dockWidget->toggleView(true);
|
||||||
hasDockWidgetVisible = true;
|
hasDockWidgetVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( hasDockWidgetVisible )
|
if (hasDockWidgetVisible)
|
||||||
|
{
|
||||||
FloatingWidget->show();
|
FloatingWidget->show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
d->HiddenFloatingWidgets.clear();
|
d->HiddenFloatingWidgets.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user