mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 16:01:36 +08:00
Fixed bug in dropIntoSection() caused by the addition of AutoHideSideBars to dock container
This commit is contained in:
parent
5a9f23a9ad
commit
64bd9021d9
@ -566,8 +566,8 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin
|
|||||||
TargetAreaSplitter = Splitter;
|
TargetAreaSplitter = Splitter;
|
||||||
}
|
}
|
||||||
int AreaIndex = TargetAreaSplitter->indexOf(TargetArea);
|
int AreaIndex = TargetAreaSplitter->indexOf(TargetArea);
|
||||||
auto Widget = FloatingWidget->dockContainer()->findChild<QWidget*>(QString(), Qt::FindDirectChildrenOnly);
|
auto FloatingSplitter = FloatingWidget->dockContainer()->findChild<CDockSplitter*>(
|
||||||
auto FloatingSplitter = qobject_cast<QSplitter*>(Widget);
|
QString(), Qt::FindDirectChildrenOnly);
|
||||||
|
|
||||||
if (TargetAreaSplitter->orientation() == InsertParam.orientation())
|
if (TargetAreaSplitter->orientation() == InsertParam.orientation())
|
||||||
{
|
{
|
||||||
@ -576,7 +576,7 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin
|
|||||||
bool AdjustSplitterSizes = true;
|
bool AdjustSplitterSizes = true;
|
||||||
if ((FloatingSplitter->orientation() != InsertParam.orientation()) && FloatingSplitter->count() > 1)
|
if ((FloatingSplitter->orientation() != InsertParam.orientation()) && FloatingSplitter->count() > 1)
|
||||||
{
|
{
|
||||||
TargetAreaSplitter->insertWidget(AreaIndex + InsertParam.insertOffset(), Widget);
|
TargetAreaSplitter->insertWidget(AreaIndex + InsertParam.insertOffset(), FloatingSplitter);
|
||||||
updateSplitterHandles(TargetAreaSplitter);
|
updateSplitterHandles(TargetAreaSplitter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -606,7 +606,7 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin
|
|||||||
bool AdjustSplitterSizes = true;
|
bool AdjustSplitterSizes = true;
|
||||||
if ((FloatingSplitter->orientation() != InsertParam.orientation()) && FloatingSplitter->count() > 1)
|
if ((FloatingSplitter->orientation() != InsertParam.orientation()) && FloatingSplitter->count() > 1)
|
||||||
{
|
{
|
||||||
NewSplitter->addWidget(Widget);
|
NewSplitter->addWidget(FloatingSplitter);
|
||||||
updateSplitterHandles(NewSplitter);
|
updateSplitterHandles(NewSplitter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user