summaryrefslogtreecommitdiff
path: root/plugins/NewStory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewStory')
-rw-r--r--plugins/NewStory/src/templates.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 3a3ca833bc..cf17be6a73 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -370,7 +370,12 @@ void LoadTemplates()
void SaveTemplates()
{
- for (auto &it : templates)
- if (it.value)
- db_set_ws(0, MODULENAME, it.setting, it.value);
+ for (auto &it : templates) {
+ if (it.value) {
+ if (mir_wstrcmp(it.value, it.defvalue))
+ g_plugin.setWString(it.setting, it.value);
+ else
+ g_plugin.delSetting(it.setting);
+ }
+ }
}