From 0e28a226558771ec0a92cc47ecee9238385021e5 Mon Sep 17 00:00:00 2001 From: Josiah Bills Date: Thu, 6 Mar 2025 10:33:37 -0500 Subject: [PATCH] Fixed crash caused by unparented widgets after restoring layout. This is essentially due to `setDockArea` undoing the earlier `setParent`. --- src/DockWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 23b493d..b4e0bb1 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -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); }