mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Merge branch 'master' into Central-Widget
This commit is contained in:
commit
691c9683ce
@ -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)
|
||||
{
|
||||
|
@ -654,7 +654,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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user