Qt/ToolBar: Fix checkbox not properly reflecting toolbar visibility

This commit is contained in:
spycrab 2018-05-19 15:50:21 +02:00
parent fc525bdf8f
commit 7a8b2da55e

View File

@ -40,6 +40,7 @@ ToolBar::ToolBar(QWidget* parent) : QToolBar(parent)
connect(&Settings::Instance(), &Settings::DebugModeToggled, this, &ToolBar::OnDebugModeToggled);
connect(&Settings::Instance(), &Settings::ToolBarVisibilityChanged, this, &ToolBar::setVisible);
connect(this, &ToolBar::visibilityChanged, &Settings::Instance(), &Settings::SetToolBarVisible);
connect(&Settings::Instance(), &Settings::WidgetLockChanged, this,
[this](bool locked) { setMovable(!locked); });