Qt: Fix safe mode not resetting on gamesettings clear
This commit is contained in:
parent
05c285f760
commit
be268d8bf1
|
@ -190,6 +190,9 @@ void SettingsWindow::addPages()
|
||||||
|
|
||||||
connect(m_advanced_settings, &AdvancedSettingsWidget::onShowDebugOptionsChanged, m_graphics_settings,
|
connect(m_advanced_settings, &AdvancedSettingsWidget::onShowDebugOptionsChanged, m_graphics_settings,
|
||||||
&GraphicsSettingsWidget::onShowDebugSettingsChanged);
|
&GraphicsSettingsWidget::onShowDebugSettingsChanged);
|
||||||
|
|
||||||
|
if (isPerGameSettings())
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_sif.get(), m_ui.safeMode, "Main", "DisableAllEnhancements", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::reloadPages()
|
void SettingsWindow::reloadPages()
|
||||||
|
@ -206,6 +209,8 @@ void SettingsWindow::reloadPages()
|
||||||
delete widget;
|
delete widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_ui.safeMode->disconnect();
|
||||||
|
|
||||||
addPages();
|
addPages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +246,6 @@ void SettingsWindow::connectUi()
|
||||||
if (m_ui.clearGameSettings)
|
if (m_ui.clearGameSettings)
|
||||||
connect(m_ui.clearGameSettings, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
|
connect(m_ui.clearGameSettings, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
|
||||||
|
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_sif.get(), m_ui.safeMode, "Main", "DisableAllEnhancements", false);
|
|
||||||
registerWidgetHelp(m_ui.safeMode, tr("Safe Mode"), tr("Unchecked"),
|
registerWidgetHelp(m_ui.safeMode, tr("Safe Mode"), tr("Unchecked"),
|
||||||
tr("Disables all enhancement options, simulating the system as accurately as possible. Use to "
|
tr("Disables all enhancement options, simulating the system as accurately as possible. Use to "
|
||||||
"quickly determine whether an enhancement is responsible for game bugs."));
|
"quickly determine whether an enhancement is responsible for game bugs."));
|
||||||
|
|
Loading…
Reference in New Issue