Some small coding style fixes

This commit is contained in:
Uwe Kindler 2021-12-12 17:28:11 +01:00
parent 1d90e8e823
commit b15bc26a63

View File

@ -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)
{ {
@ -798,8 +804,10 @@ void CDockManager::restoreHiddenFloatingWidgets()
} }
if (hasDockWidgetVisible) if (hasDockWidgetVisible)
{
FloatingWidget->show(); FloatingWidget->show();
} }
}
d->HiddenFloatingWidgets.clear(); d->HiddenFloatingWidgets.clear();
} }