Skip to content

Commit 302ee59

Browse files
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
1 parent 60d915a commit 302ee59

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/AutoHideDockContainer.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,7 @@ AutoHideDockContainerPrivate::AutoHideDockContainerPrivate(
187187
//============================================================================
188188
CDockContainerWidget* CAutoHideDockContainer::dockContainer() const
189189
{
190-
if (d->DockArea)
191-
{
192-
return d->DockArea->dockContainer();
193-
}
194-
else
195-
{
196-
return internal::findParent<CDockContainerWidget*>(this);
197-
}
190+
return internal::findParent<CDockContainerWidget*>(this);
198191
}
199192

200193

@@ -303,8 +296,15 @@ CAutoHideDockContainer::~CAutoHideDockContainer()
303296
//============================================================================
304297
CAutoHideSideBar* CAutoHideDockContainer::sideBar() const
305298
{
306-
auto DockContainer = dockContainer();
307-
return DockContainer ? DockContainer->sideTabBar(d->SideTabBarArea) : nullptr;
299+
if (d->SideTab)
300+
{
301+
return d->SideTab->sideBar();
302+
}
303+
else
304+
{
305+
auto DockContainer = dockContainer();
306+
return DockContainer ? DockContainer->sideTabBar(d->SideTabBarArea) : nullptr;
307+
}
308308
}
309309

310310

0 commit comments

Comments
 (0)