Merge branch 'master' into Central-Widget

This commit is contained in:
hulswit
2020-08-20 16:37:05 +02:00
2 changed files with 28 additions and 1 deletions

View File

@@ -86,6 +86,18 @@ public:
}
/**
* Delete widgets without parents in this layout
*/
~CDockAreaLayout()
{
for(auto Widget : m_Widgets)
{
if(!Widget->parent())
delete Widget;
}
}
/**
* Returns the number of widgets in this layout
*/
@@ -467,6 +479,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)
{