aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2022-05-16 14:37:00 -0400
committerRyan Ofsky <ryan@ofsky.org>2022-05-26 11:05:10 -0400
commite47c6c76561807d30cff3c2e5372ea83c91a3677 (patch)
tree9ccedbcc5e42ee924f7b3e270771b7b6a1ab2d66 /src/qt
parent99ccc02b652cf67a3aec66371fcb6bbe737571a7 (diff)
downloadbitcoin-e47c6c76561807d30cff3c2e5372ea83c91a3677.tar.xz
Reset settings.json when GUI options are reset
Clear settings.json file and save settings.json.bak file when "Reset Options" GUI button is pressed or -resetguisettings command line option is used.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/optionsmodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 1b2bcefe94..0b4359a917 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -251,6 +251,9 @@ static void BackupSettings(const fs::path& filename, const QSettings& src)
void OptionsModel::Reset()
{
+ // Backup and reset settings.json
+ node().resetSettings();
+
QSettings settings;
// Backup old settings to chain-specific datadir for troubleshooting