From 64bd9021d98520dcf47f4d93c7a71831e0517c1e Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Tue, 8 Nov 2022 16:32:35 +0100 Subject: [PATCH] Fixed bug in dropIntoSection() caused by the addition of AutoHideSideBars to dock container --- src/DockContainerWidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index c8d5d69..9e0aab5 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -566,8 +566,8 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin TargetAreaSplitter = Splitter; } int AreaIndex = TargetAreaSplitter->indexOf(TargetArea); - auto Widget = FloatingWidget->dockContainer()->findChild(QString(), Qt::FindDirectChildrenOnly); - auto FloatingSplitter = qobject_cast(Widget); + auto FloatingSplitter = FloatingWidget->dockContainer()->findChild( + QString(), Qt::FindDirectChildrenOnly); if (TargetAreaSplitter->orientation() == InsertParam.orientation()) { @@ -576,7 +576,7 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin bool AdjustSplitterSizes = true; if ((FloatingSplitter->orientation() != InsertParam.orientation()) && FloatingSplitter->count() > 1) { - TargetAreaSplitter->insertWidget(AreaIndex + InsertParam.insertOffset(), Widget); + TargetAreaSplitter->insertWidget(AreaIndex + InsertParam.insertOffset(), FloatingSplitter); updateSplitterHandles(TargetAreaSplitter); } else @@ -606,7 +606,7 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin bool AdjustSplitterSizes = true; if ((FloatingSplitter->orientation() != InsertParam.orientation()) && FloatingSplitter->count() > 1) { - NewSplitter->addWidget(Widget); + NewSplitter->addWidget(FloatingSplitter); updateSplitterHandles(NewSplitter); } else