mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Fix -resetguisettings
(#3624)
This commit is contained in:
parent
508fc2db4b
commit
8d99e7836c
@ -393,7 +393,7 @@ BitcoinApplication::~BitcoinApplication()
|
||||
#endif
|
||||
// Delete Qt-settings if user clicked on "Reset Options"
|
||||
QSettings settings;
|
||||
if(optionsModel && optionsModel->resetSettings){
|
||||
if(optionsModel && optionsModel->resetSettingsOnShutdown){
|
||||
settings.clear();
|
||||
settings.sync();
|
||||
}
|
||||
|
@ -254,6 +254,7 @@ void OptionsDialog::on_resetButton_clicked()
|
||||
|
||||
/* reset all options and close GUI */
|
||||
model->Reset();
|
||||
model->resetSettingsOnShutdown = true;
|
||||
QApplication::quit();
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,6 @@ void OptionsModel::Init(bool resetSettings)
|
||||
|
||||
checkAndMigrate();
|
||||
|
||||
this->resetSettings = resetSettings;
|
||||
|
||||
QSettings settings;
|
||||
|
||||
// Ensure restart flag is unset on client startup
|
||||
@ -226,7 +224,6 @@ void OptionsModel::Reset()
|
||||
|
||||
// Remove all entries from our QSettings object
|
||||
settings.clear();
|
||||
resetSettings = true; // Needed in dash.cpp during shotdown to also remove the window positions
|
||||
|
||||
// default setting for OptionsModel::StartAtStartup - disabled
|
||||
if (GUIUtil::GetStartOnSystemStartup())
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
/* Restart flag helper */
|
||||
void setRestartRequired(bool fRequired);
|
||||
bool isRestartRequired() const;
|
||||
bool resetSettings;
|
||||
bool resetSettingsOnShutdown{false};
|
||||
|
||||
private:
|
||||
/* Qt-only settings */
|
||||
|
Loading…
Reference in New Issue
Block a user