Fix docking behavior when there is a central widget

This commit is contained in:
Syarif Fakhri
2022-09-13 16:02:14 +08:00
parent 42498b2021
commit 8ddabc4cc8
4 changed files with 23 additions and 10 deletions

View File

@@ -1129,6 +1129,22 @@ bool CDockAreaWidget::isCentralWidgetArea() const
}
//============================================================================
bool CDockAreaWidget::containsCentralWidget() const
{
auto centralWidget = dockManager()->centralWidget();
for (const auto &dockWidget : dockWidgets())
{
if (dockWidget == centralWidget)
{
return true;
}
}
return false;
}
//============================================================================
QSize CDockAreaWidget::minimumSizeHint() const
{