diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index 1696e1f..a12bcb0 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -478,6 +478,14 @@ void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget) ADS_PRINT("Dock Area empty"); DockContainer->removeDockArea(this); this->deleteLater(); + if(DockContainer->dockAreaCount() == 0) + { + if(CFloatingDockContainer* FloatingDockContainer = DockContainer->floatingWidget()) + { + FloatingDockContainer->hide(); + FloatingDockContainer->deleteLater(); + } + } } else if (DockWidget == CurrentDockWidget) { diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 95e4fac..cd109c6 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -653,7 +653,14 @@ void CDockManager::showEvent(QShowEvent *event) for (auto FloatingWidget : d->UninitializedFloatingWidgets) { - FloatingWidget->show(); + for(CDockWidget* DockWidget : FloatingWidget->dockWidgets()) + { + if(!DockWidget->isClosed()) + { + FloatingWidget->show(); + break; + } + } } d->UninitializedFloatingWidgets.clear(); }