diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-02 18:11:59 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-02 18:11:59 +0300 |
commit | 3e7f47be3cd75398b20b7486ed5374967ac0fa71 (patch) | |
tree | 16999fa514e1fe2e18fb2582d672bba4f10b5616 /plugins | |
parent | fce28529f1b38382c92e1987844cc67250041390 (diff) |
missing controls shall not wipe database settings
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 83d0aeef0c..1cbdd9be21 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -832,9 +832,6 @@ public: bool OnApply() override
{
- uint32_t dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT) & ~(MWF_LOG_ALL);
- db_set_dw(0, SRMSGMOD_T, "mwflags", m_flags | dwFlags);
-
if (chkLoadCount.GetState())
g_plugin.setByte(SRMSGSET_LOADHISTORY, LOADHISTORY_COUNT);
else if (chkLoadTime.GetState())
@@ -844,14 +841,20 @@ public: g_plugin.setWord(SRMSGSET_LOADCOUNT, spnLoadCount.GetPosition());
g_plugin.setWord(SRMSGSET_LOADTIME, spnLoadTime.GetPosition());
- db_set_dw(0, SRMSGMOD_T, "IndentAmount", spnLeft.GetPosition());
- db_set_dw(0, SRMSGMOD_T, "RightIndent", spnRight.GetPosition());
-
// scan the tree view and obtain the options...
if (chkAlwaysTrim.GetState())
db_set_dw(0, SRMSGMOD_T, "maxhist", spnTrim.GetPosition());
else
db_set_dw(0, SRMSGMOD_T, "maxhist", 0);
+
+ if (logOpts.GetHwnd()) {
+ uint32_t dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT) & ~(MWF_LOG_ALL);
+ db_set_dw(0, SRMSGMOD_T, "mwflags", m_flags | dwFlags);
+
+ db_set_dw(0, SRMSGMOD_T, "IndentAmount", spnLeft.GetPosition());
+ db_set_dw(0, SRMSGMOD_T, "RightIndent", spnRight.GetPosition());
+ }
+
PluginConfig.reloadSettings();
Srmm_ApplyOptions();
return true;
|