Window positions not reset

This commit is contained in:
crowning- 2015-08-24 23:12:31 +02:00
parent 8af620bd80
commit 26c471df6b
3 changed files with 9 additions and 0 deletions

View File

@ -359,6 +359,12 @@ BitcoinApplication::~BitcoinApplication()
delete paymentServer;
paymentServer = 0;
#endif
// Delete Qt-settings if user clicked on "Reset Options"
QSettings settings;
if(optionsModel->resetSettings){
settings.clear();
settings.sync();
}
delete optionsModel;
optionsModel = 0;
}

View File

@ -41,6 +41,7 @@ void OptionsModel::addOverriddenOption(const std::string &option)
// Writes all missing QSettings with their default values
void OptionsModel::Init()
{
resetSettings = false;
QSettings settings;
// Ensure restart flag is unset on client startup
@ -151,6 +152,7 @@ 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())

View File

@ -70,6 +70,7 @@ public:
/* Restart flag helper */
void setRestartRequired(bool fRequired);
bool isRestartRequired();
bool resetSettings;
private:
/* Qt-only settings */