mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Fix -resetguisettings
(#3624)
This commit is contained in:
parent
7e10b8236d
commit
74a66f5bd2
@ -357,7 +357,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();
|
||||
}
|
||||
|
@ -284,6 +284,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
|
||||
@ -245,7 +243,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())
|
||||
|
@ -88,7 +88,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