From 91190e8744d65467a571339f1a64f36d1f85626b Mon Sep 17 00:00:00 2001 From: Syarif Fakhri Date: Fri, 14 Oct 2022 17:47:41 +0800 Subject: [PATCH] cleaner dock widget side tab click handling --- src/AutoHideDockContainer.cpp | 1 + src/DockWidget.cpp | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/AutoHideDockContainer.cpp b/src/AutoHideDockContainer.cpp index 100e801..408d383 100644 --- a/src/AutoHideDockContainer.cpp +++ b/src/AutoHideDockContainer.cpp @@ -437,6 +437,7 @@ void CAutoHideDockContainer::collapseView(bool Enable) d->DockWidget->show(); updateSize(); updateMask(); + d->DockManager->setDockWidgetFocused(d->DockWidget); qApp->installEventFilter(this); } } diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 0d189a0..50eaf15 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -1085,15 +1085,7 @@ void CDockWidget::onDockWidgetSideTabClicked() return; } - autoHideContainer->raise(); autoHideContainer->toggleCollapseState(); - if (autoHideContainer->isVisible()) - { - // d->DockManager->setDockWidgetFocused(this) does not - // de focus the old widget, leading to the auto hide still being visible - // even after clicking outside the auto hide. - setFocus(Qt::ActiveWindowFocusReason); - } } //============================================================================