summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAl12rs <gabriel.cortesi@outlook.com>2018-02-13 21:02:56 +0100
committerAl12rs <gabriel.cortesi@outlook.com>2018-02-13 21:02:56 +0100
commite1fc0d22b6c9d7670664c68e0feb8766540bfca5 (patch)
tree2052f1e6ef7dca38b49e6e28cb2e4a7bcfbf92a1 /src
parent9ddbf25809e42f2b34d1757c11e3abdf6d7577c4 (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.
Diffstat (limited to 'src')
-rw-r--r--src/editexecutablesdialog.cpp3
-rw-r--r--src/profile.cpp5
-rw-r--r--src/profile.h1
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 &section, const QString &name,
{
m_Settings->setValue(section + "/" + name, value);
}
+
+void Profile::removeSetting(const QString &section, 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 &section, const QString &name,
const QVariant &value);
+ void removeSetting(const QString &section, const QString &name);
signals: