mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-01 02:42:39 +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
|
* Returns the number of widgets in this layout
|
||||||
*/
|
*/
|
||||||
@ -467,6 +479,14 @@ void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget)
|
|||||||
ADS_PRINT("Dock Area empty");
|
ADS_PRINT("Dock Area empty");
|
||||||
DockContainer->removeDockArea(this);
|
DockContainer->removeDockArea(this);
|
||||||
this->deleteLater();
|
this->deleteLater();
|
||||||
|
if(DockContainer->dockAreaCount() == 0)
|
||||||
|
{
|
||||||
|
if(CFloatingDockContainer* FloatingDockContainer = DockContainer->floatingWidget())
|
||||||
|
{
|
||||||
|
FloatingDockContainer->hide();
|
||||||
|
FloatingDockContainer->deleteLater();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (DockWidget == CurrentDockWidget)
|
else if (DockWidget == CurrentDockWidget)
|
||||||
{
|
{
|
||||||
|
@ -653,8 +653,15 @@ void CDockManager::showEvent(QShowEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto FloatingWidget : d->UninitializedFloatingWidgets)
|
for (auto FloatingWidget : d->UninitializedFloatingWidgets)
|
||||||
|
{
|
||||||
|
for(CDockWidget* DockWidget : FloatingWidget->dockWidgets())
|
||||||
|
{
|
||||||
|
if(!DockWidget->isClosed())
|
||||||
{
|
{
|
||||||
FloatingWidget->show();
|
FloatingWidget->show();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
d->UninitializedFloatingWidgets.clear();
|
d->UninitializedFloatingWidgets.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user