diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-02-13 21:02:56 +0100 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-02-13 21:02:56 +0100 |
| commit | e1fc0d22b6c9d7670664c68e0feb8766540bfca5 (patch) | |
| tree | 2052f1e6ef7dca38b49e6e28cb2e4a7bcfbf92a1 | |
| parent | 9ddbf25809e42f2b34d1757c11e3abdf6d7577c4 (diff) | |
- Fixed a bug that would keep re-activating the "Create files in mod instead of Overwrite" setting in the executable dialog after the user activated it for the first time.
Basically it looked in the stored settings to see if there was an entry for that executable to decide if the checkbox was to be enebled but never deleted that entry if the checkbox was then deselected.
| -rw-r--r-- | src/editexecutablesdialog.cpp | 3 | ||||
| -rw-r--r-- | src/profile.cpp | 5 | ||||
| -rw-r--r-- | src/profile.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 89605016..fde6b397 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -115,6 +115,9 @@ void EditExecutablesDialog::saveExecutable() m_Profile->storeSetting("custom_overwrites", ui->titleEdit->text(), ui->newFilesModBox->currentText()); } + else { + m_Profile->removeSetting("custom_overwrites", ui->titleEdit->text()); + } } diff --git a/src/profile.cpp b/src/profile.cpp index 00509ef7..bbb5b814 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -834,3 +834,8 @@ void Profile::storeSetting(const QString §ion, const QString &name, { m_Settings->setValue(section + "/" + name, value); } + +void Profile::removeSetting(const QString §ion, const QString &name) +{ + m_Settings->remove(section + "/" + name); +}
\ No newline at end of file diff --git a/src/profile.h b/src/profile.h index 3e620b3c..1fcad046 100644 --- a/src/profile.h +++ b/src/profile.h @@ -292,6 +292,7 @@ public: void storeSetting(const QString §ion, const QString &name, const QVariant &value); + void removeSetting(const QString §ion, const QString &name); signals: |
