From 2f0950cfb4fe47f679b03d8f26c1067055f0973a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Apr 2020 15:20:39 +0300 Subject: =?UTF-8?q?fixes=20#2335=20(NewStory:=20=D0=BD=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B0=D1=82=D1=8C=20=D0=B4=D0=B5=D1=84=D0=BE=D0=BB?= =?UTF-8?q?=D1=82=D0=BD=D1=8B=D0=B5=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=B2=20=D0=B1=D0=B0=D0=B7=D1=83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/templates.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/NewStory') 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); + } + } } -- cgit v1.2.3