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

Fixed crash caused by unparented widgets after restoring layout.

This is essentially due to `setDockArea` undoing the earlier
`setParent`.
This commit is contained in:
Josiah Bills 2025-03-06 10:33:37 -05:00
parent e836b154eb
commit 0e28a22655

View File

@ -841,9 +841,9 @@ void CDockWidget::saveState(QXmlStreamWriter& s) const
void CDockWidget::flagAsUnassigned()
{
d->Closed = true;
setParent(d->DockManager);
setVisible(false);
setDockArea(nullptr);
setParent(d->DockManager);
tabWidget()->setParent(this);
}