@@ -759,7 +759,6 @@ void CDockManager::showEvent(QShowEvent *event)
759
759
760
760
// Fix Issue #380
761
761
restoreHiddenFloatingWidgets ();
762
-
763
762
if (d->UninitializedFloatingWidgets .empty ())
764
763
{
765
764
return ;
@@ -777,8 +776,15 @@ void CDockManager::showEvent(QShowEvent *event)
777
776
d->UninitializedFloatingWidgets .clear ();
778
777
}
779
778
779
+
780
+ // ============================================================================
780
781
void CDockManager::restoreHiddenFloatingWidgets ()
781
782
{
783
+ if (d->HiddenFloatingWidgets .isEmpty ())
784
+ {
785
+ return ;
786
+ }
787
+
782
788
// Restore floating widgets that were hidden upon hideManagerAndFloatingWidgets
783
789
for (auto FloatingWidget : d->HiddenFloatingWidgets )
784
790
{
@@ -788,17 +794,19 @@ void CDockManager::restoreHiddenFloatingWidgets()
788
794
// Could make sense to move this to CFloatingDockContainer::showEvent(QShowEvent *event)
789
795
// if experiencing CFloatingDockContainer being shown empty in other situations, but let's keep
790
796
// 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 ())
792
798
{
793
- if ( dockWidget->toggleViewAction ()->isChecked () )
799
+ if (dockWidget->toggleViewAction ()->isChecked ())
794
800
{
795
801
dockWidget->toggleView (true );
796
802
hasDockWidgetVisible = true ;
797
803
}
798
804
}
799
805
800
- if ( hasDockWidgetVisible )
806
+ if (hasDockWidgetVisible)
807
+ {
801
808
FloatingWidget->show ();
809
+ }
802
810
}
803
811
804
812
d->HiddenFloatingWidgets .clear ();
0 commit comments