mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Fix splitter size being saved incorrectly if the overlay widget is never opened
This commit is contained in:
parent
621e5e7789
commit
3ef1ac97c2
@ -191,6 +191,19 @@ void COverlayDockContainer::addDockWidget(CDockWidget* DockWidget)
|
||||
}
|
||||
d->DockArea->addDockWidget(DockWidget);
|
||||
|
||||
const auto dockContainerParent = parentContainer();
|
||||
const auto rootSplitter = dockContainerParent->rootSplitter();
|
||||
const auto rect = rootSplitter->frameGeometry();
|
||||
const auto dockWidth = DockWidget->size().width();
|
||||
if (d->Area == CDockWidgetSideTab::SideTabBarArea::Left)
|
||||
{
|
||||
d->Splitter->setSizes({ dockWidth, rect.width() - dockWidth });
|
||||
}
|
||||
else
|
||||
{
|
||||
d->Splitter->setSizes({ rect.width() - dockWidth, dockWidth });
|
||||
}
|
||||
|
||||
updateSize();
|
||||
updateMask();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user