1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

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