Fixed dockContainer() function of AutoHideDockContainer.cpp

Returning the dock container of the internal dock area is wrong, if the dock widget is removed from
the AutoHideDockContainer, then the DockArea container function already returns the new dock container
of the DockArea and not the dock container of the AutoHideDockContainer.cpp
This commit is contained in:
Uwe Kindler 2022-12-09 08:50:12 +01:00
parent 60d915a99f
commit 302ee59d67

View File

@ -187,14 +187,7 @@ AutoHideDockContainerPrivate::AutoHideDockContainerPrivate(
//============================================================================
CDockContainerWidget* CAutoHideDockContainer::dockContainer() const
{
if (d->DockArea)
{
return d->DockArea->dockContainer();
}
else
{
return internal::findParent<CDockContainerWidget*>(this);
}
return internal::findParent<CDockContainerWidget*>(this);
}
@ -303,8 +296,15 @@ CAutoHideDockContainer::~CAutoHideDockContainer()
//============================================================================
CAutoHideSideBar* CAutoHideDockContainer::sideBar() const
{
auto DockContainer = dockContainer();
return DockContainer ? DockContainer->sideTabBar(d->SideTabBarArea) : nullptr;
if (d->SideTab)
{
return d->SideTab->sideBar();
}
else
{
auto DockContainer = dockContainer();
return DockContainer ? DockContainer->sideTabBar(d->SideTabBarArea) : nullptr;
}
}