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
This commit is contained in:
wmayer
2023-03-06 00:16:22 +01:00
committed by wwmayer
parent 76623ad0a5
commit 8381ea079d

View File

@@ -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);