@@ -759,7 +759,6 @@ void CDockManager::showEvent(QShowEvent *event)
759759
760760 // Fix Issue #380
761761 restoreHiddenFloatingWidgets ();
762-
763762 if (d->UninitializedFloatingWidgets .empty ())
764763 {
765764 return ;
@@ -777,8 +776,15 @@ void CDockManager::showEvent(QShowEvent *event)
777776 d->UninitializedFloatingWidgets .clear ();
778777}
779778
779+
780+ // ============================================================================
780781void CDockManager::restoreHiddenFloatingWidgets ()
781782{
783+ if (d->HiddenFloatingWidgets .isEmpty ())
784+ {
785+ return ;
786+ }
787+
782788 // Restore floating widgets that were hidden upon hideManagerAndFloatingWidgets
783789 for (auto FloatingWidget : d->HiddenFloatingWidgets )
784790 {
@@ -788,17 +794,19 @@ void CDockManager::restoreHiddenFloatingWidgets()
788794 // Could make sense to move this to CFloatingDockContainer::showEvent(QShowEvent *event)
789795 // if experiencing CFloatingDockContainer being shown empty in other situations, but let's keep
790796 // it here for now to make sure changes to fix Issue #380 does not impact existing behaviours
791- for ( auto dockWidget : FloatingWidget->dockWidgets () )
797+ for (auto dockWidget : FloatingWidget->dockWidgets ())
792798 {
793- if ( dockWidget->toggleViewAction ()->isChecked () )
799+ if (dockWidget->toggleViewAction ()->isChecked ())
794800 {
795801 dockWidget->toggleView (true );
796802 hasDockWidgetVisible = true ;
797803 }
798804 }
799805
800- if ( hasDockWidgetVisible )
806+ if (hasDockWidgetVisible)
807+ {
801808 FloatingWidget->show ();
809+ }
802810 }
803811
804812 d->HiddenFloatingWidgets .clear ();
0 commit comments