Qt/CommonControllersWidget: Refresh GUI on settings change.

This commit is contained in:
Admiral H. Curtiss 2022-09-20 03:58:21 +02:00
parent 22197c09a3
commit 019dc86b6f
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 6 additions and 1 deletions

View File

@ -13,12 +13,17 @@
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
#include "DolphinQt/QtUtils/SignalBlocking.h"
#include "DolphinQt/Settings.h"
CommonControllersWidget::CommonControllersWidget(QWidget* parent) : QWidget(parent)
{
CreateLayout();
LoadSettings();
ConnectWidgets();
connect(&Settings::Instance(), &Settings::ConfigChanged, this,
&CommonControllersWidget::LoadSettings);
}
void CommonControllersWidget::CreateLayout()
@ -59,7 +64,7 @@ void CommonControllersWidget::OnControllerInterfaceConfigure()
void CommonControllersWidget::LoadSettings()
{
m_common_bg_input->setChecked(Config::Get(Config::MAIN_INPUT_BACKGROUND_INPUT));
SignalBlocking(m_common_bg_input)->setChecked(Config::Get(Config::MAIN_INPUT_BACKGROUND_INPUT));
}
void CommonControllersWidget::SaveSettings()