mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Floating window fixes. (#239)
* Don't show a CFloatingDockContainer if all its CDockWidget were hidden before its first shown. * Destroy empty CFloatingDockContainer when removing CDockWidget via removeDockWidget function.
This commit is contained in:
parent
8361f90dce
commit
a4d281dbb6
@ -478,6 +478,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,7 +653,14 @@ void CDockManager::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
for (auto FloatingWidget : d->UninitializedFloatingWidgets)
|
for (auto FloatingWidget : d->UninitializedFloatingWidgets)
|
||||||
{
|
{
|
||||||
FloatingWidget->show();
|
for(CDockWidget* DockWidget : FloatingWidget->dockWidgets())
|
||||||
|
{
|
||||||
|
if(!DockWidget->isClosed())
|
||||||
|
{
|
||||||
|
FloatingWidget->show();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
d->UninitializedFloatingWidgets.clear();
|
d->UninitializedFloatingWidgets.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user