From be7e78aaf9142c95bb652a08c4080d982e02e82d Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 6 Mar 2023 00:16:22 +0100 Subject: [PATCH] Gui: fix regression with the default visibility of toolbars If the user e.g. activates the Clipboard toolbar then it should not be hidden any more if the user switches to another workbench. The way it is now the user has to make this toolbar visible over and over again when changing the workbench. This also has the negative effect that the workbench selector changes its position --- src/Gui/ToolBarManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Gui/ToolBarManager.cpp b/src/Gui/ToolBarManager.cpp index 8999746ea0..91d9e7f56a 100644 --- a/src/Gui/ToolBarManager.cpp +++ b/src/Gui/ToolBarManager.cpp @@ -226,7 +226,8 @@ void ToolBarManager::setup(ToolBarItem* toolBarItems) toolbars.removeAt(index); } - bool visible = hPref->GetBool(toolbarName.c_str(), true) && (*it)->visibility == ToolBarItem::HideStyle::VISIBLE; + bool visible = hPref->GetBool(toolbarName.c_str(), (*it)->visibility == ToolBarItem::HideStyle::VISIBLE); + visible &= (*it)->visibility != ToolBarItem::HideStyle::FORCE_HIDE; toolbar->setVisible(visible); toolbar->toggleViewAction()->setVisible((*it)->visibility != ToolBarItem::HideStyle::FORCE_HIDE);