mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-18 16:10:07 +00:00
Qt: Clear help text map on reload
Saves keeping messages around for pointers that are no longer valid.
This commit is contained in:
parent
8ef97b9b46
commit
b93353647f
@ -183,6 +183,10 @@ void SettingsWindow::addPages()
|
||||
&GraphicsSettingsWidget::onShowDebugSettingsChanged);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_sif.get(), m_ui.safeMode, "Main", "DisableAllEnhancements", false);
|
||||
|
||||
registerWidgetHelp(m_ui.safeMode, tr("Safe Mode"), tr("Unchecked"),
|
||||
tr("Disables all enhancement options, simulating the system as accurately as possible. Use to "
|
||||
"quickly determine whether an enhancement is responsible for game bugs."));
|
||||
}
|
||||
|
||||
void SettingsWindow::reloadPages()
|
||||
@ -205,6 +209,8 @@ void SettingsWindow::reloadPages()
|
||||
m_ui.safeMode->disconnect();
|
||||
}
|
||||
|
||||
m_widget_help_text_map.clear();
|
||||
m_current_help_widget = nullptr;
|
||||
addPages();
|
||||
}
|
||||
|
||||
@ -238,10 +244,6 @@ void SettingsWindow::connectUi()
|
||||
connect(m_ui.copyGlobalSettings, &QPushButton::clicked, this, &SettingsWindow::onCopyGlobalSettingsClicked);
|
||||
if (m_ui.clearGameSettings)
|
||||
connect(m_ui.clearGameSettings, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
|
||||
|
||||
registerWidgetHelp(m_ui.safeMode, tr("Safe Mode"), tr("Unchecked"),
|
||||
tr("Disables all enhancement options, simulating the system as accurately as possible. Use to "
|
||||
"quickly determine whether an enhancement is responsible for game bugs."));
|
||||
}
|
||||
|
||||
void SettingsWindow::addWidget(QWidget* widget, QString title, QString icon, QString help_text)
|
||||
|
Loading…
x
Reference in New Issue
Block a user