From 302fcd14350ea29f08231789cdba905599c8fbee Mon Sep 17 00:00:00 2001 From: Syarif Fakhri Date: Wed, 7 Sep 2022 15:50:53 +0800 Subject: [PATCH] Fix bug where dragging an overlayed widget would cause it to be empty Fix bug where pin and unpin doesn't work --- src/DockAreaWidget.cpp | 3 ++- src/DockFocusController.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index a247a63..4c51b91 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -1045,11 +1045,12 @@ void CDockAreaWidget::onAutoHideToggleRequested(CDockWidget* DockWidget, bool En if (Enable) { dockContainer()->createAndInitializeDockWidgetOverlayContainer(area, DockWidget); - toggleView(false); + DockWidget->toggleView(false); } else { overlayDockContainer()->moveContentsToParent(); + DockWidget->toggleView(true); } } diff --git a/src/DockFocusController.cpp b/src/DockFocusController.cpp index 180219e..f1226b2 100644 --- a/src/DockFocusController.cpp +++ b/src/DockFocusController.cpp @@ -189,7 +189,7 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget) } #endif - if (old && old->overlayDockContainer() && old != DockWidget) + if (old && old->overlayDockContainer() && old->overlayDockContainer()->isVisible() && old != FocusedDockWidget) { old->toggleView(false); }