User rootSplitter() function instead of searching for child widget

This commit is contained in:
Uwe Kindler 2022-11-08 20:37:48 +01:00
parent 89cca4c36a
commit 208c804db1

View File

@ -552,8 +552,9 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin
return;
}
CDockContainerWidget* FloatingContainer = FloatingWidget->dockContainer();
auto InsertParam = internal::dockAreaInsertParameters(area);
auto NewDockAreas = FloatingWidget->dockContainer()->findChildren<CDockAreaWidget*>(
auto NewDockAreas = FloatingContainer->findChildren<CDockAreaWidget*>(
QString(), Qt::FindChildrenRecursively);
QSplitter* TargetAreaSplitter = internal::findParent<QSplitter*>(TargetArea);
@ -566,9 +567,7 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin
TargetAreaSplitter = Splitter;
}
int AreaIndex = TargetAreaSplitter->indexOf(TargetArea);
auto FloatingSplitter = FloatingWidget->dockContainer()->findChild<CDockSplitter*>(
QString(), Qt::FindDirectChildrenOnly);
auto FloatingSplitter = FloatingContainer->rootSplitter();
if (TargetAreaSplitter->orientation() == InsertParam.orientation())
{
auto Sizes = TargetAreaSplitter->sizes();