File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,18 @@ class CDockAreaLayout
86
86
87
87
}
88
88
89
+ /* *
90
+ * Delete widgets without parents in this layout
91
+ */
92
+ ~CDockAreaLayout ()
93
+ {
94
+ for (auto Widget : m_Widgets)
95
+ {
96
+ if (!Widget->parent ())
97
+ delete Widget;
98
+ }
99
+ }
100
+
89
101
/* *
90
102
* Returns the number of widgets in this layout
91
103
*/
@@ -467,6 +479,14 @@ void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget)
467
479
ADS_PRINT (" Dock Area empty" );
468
480
DockContainer->removeDockArea (this );
469
481
this ->deleteLater ();
482
+ if (DockContainer->dockAreaCount () == 0 )
483
+ {
484
+ if (CFloatingDockContainer* FloatingDockContainer = DockContainer->floatingWidget ())
485
+ {
486
+ FloatingDockContainer->hide ();
487
+ FloatingDockContainer->deleteLater ();
488
+ }
489
+ }
470
490
}
471
491
else if (DockWidget == CurrentDockWidget)
472
492
{
Original file line number Diff line number Diff line change @@ -654,7 +654,14 @@ void CDockManager::showEvent(QShowEvent *event)
654
654
655
655
for (auto FloatingWidget : d->UninitializedFloatingWidgets )
656
656
{
657
- FloatingWidget->show ();
657
+ for (CDockWidget* DockWidget : FloatingWidget->dockWidgets ())
658
+ {
659
+ if (!DockWidget->isClosed ())
660
+ {
661
+ FloatingWidget->show ();
662
+ break ;
663
+ }
664
+ }
658
665
}
659
666
d->UninitializedFloatingWidgets .clear ();
660
667
}
You can’t perform that action at this time.
0 commit comments