From 08714ddc3f6d3b5a869179866600e3be77fed23c Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Tue, 1 Nov 2022 16:11:45 +0100 Subject: [PATCH] Properly evaluate pinnable flag --- src/DockAreaTitleBar.cpp | 5 +---- src/DockAreaWidget.cpp | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/DockAreaTitleBar.cpp b/src/DockAreaTitleBar.cpp index 1ca898e..f6e79a7 100644 --- a/src/DockAreaTitleBar.cpp +++ b/src/DockAreaTitleBar.cpp @@ -493,10 +493,7 @@ void CDockAreaTitleBar::onCurrentTabChanged(int Index) //============================================================================ void CDockAreaTitleBar::onAutoHideButtonClicked() { - if (d->DockArea->features().testFlag(CDockWidget::DockWidgetPinnable)) - { - d->DockArea->toggleAutoHideArea(!d->DockArea->isAutoHide()); - } + d->DockArea->toggleAutoHideArea(!d->DockArea->isAutoHide()); } diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index 5035237..8b7dc24 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -1176,7 +1176,8 @@ void CDockAreaWidget::toggleAutoHideArea(bool Enable) const auto area = dockContainer()->calculateSideTabBarArea(this); - if (CDockManager::testAutoHideConfigFlag(CDockManager::AutoHideButtonTogglesArea)) + if (CDockManager::testAutoHideConfigFlag(CDockManager::AutoHideButtonTogglesArea) + && features().testFlag(CDockWidget::DockWidgetPinnable)) { for (const auto DockWidget : openedDockWidgets()) {