mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
Changed moveContentsToParent() logic when disabling auto dock for a certain widget
This commit is contained in:
parent
a8a40f0bee
commit
e3117121cc
@ -339,19 +339,10 @@ CDockAreaWidget* CAutoHideDockContainer::dockAreaWidget() const
|
||||
void CAutoHideDockContainer::moveContentsToParent()
|
||||
{
|
||||
cleanupAndDelete();
|
||||
|
||||
const auto position = mapToGlobal(d->getSimplifiedDockAreaPosition());
|
||||
|
||||
const auto dockAreaWidget = parentContainer()->dockAreaAt(position);
|
||||
if (dockAreaWidget != nullptr && !dockAreaWidget->containsCentralWidget())
|
||||
{
|
||||
parentContainer()->addDockWidget(CenterDockWidgetArea, d->DockWidget, dockAreaWidget);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If we unpin the auto hide tock widget, then we insert it into the same
|
||||
// location like it had as a auto hide widget. This brings the least surprise
|
||||
// to the user and he does not have to search where the widget was inserted.
|
||||
parentContainer()->addDockWidget(d->getArea(d->SideTabBarArea), d->DockWidget);
|
||||
}
|
||||
|
||||
parentContainer()->removeDockArea(d->DockArea);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user