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 0e6cf0d9dd
commit be7e78aaf9

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