From f3305b95d236499a0adb83604c9ff4cf7afe31d2 Mon Sep 17 00:00:00 2001 From: Syarif Fakhri Date: Wed, 14 Sep 2022 13:10:06 +0800 Subject: [PATCH] Remove old crash fix --- src/DockAreaWidget.cpp | 2 +- src/OverlayDockContainer.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index d8e95ad..127d9ca 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -515,7 +515,7 @@ void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget) { setCurrentDockWidget(NextOpenDockWidget); } - else if (d->ContentsLayout->isEmpty() && DockContainer->dockAreaCount() >= 1) + else if (d->ContentsLayout->isEmpty() && DockContainer->dockAreaCount() >= 1 && !isOverlayed()) // Don't remove empty dock areas that are overlayed, they'll be deleted by the overlay dock { ADS_PRINT("Dock Area empty"); DockContainer->removeDockArea(this); diff --git a/src/OverlayDockContainer.cpp b/src/OverlayDockContainer.cpp index 6f38b7d..e78e2b0 100644 --- a/src/OverlayDockContainer.cpp +++ b/src/OverlayDockContainer.cpp @@ -196,6 +196,10 @@ COverlayDockContainer::~COverlayDockContainer() { ADS_PRINT("~COverlayDockContainer"); + // Remove event filter in case there are any queued messages + d->DockArea->removeEventFilter(this); + parent()->removeEventFilter(this); + if (d->DockManager) { parentContainer()->removeOverlayWidget(this); @@ -310,10 +314,6 @@ void COverlayDockContainer::cleanupAndDelete() dockWidget->sideTabWidget()->hide(); } - // Remove event filter in case there are any queued messages - d->DockArea->removeEventFilter(this); - parent()->removeEventFilter(this); - hide(); deleteLater(); }