diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-04 22:48:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-04 22:48:07 +0300 |
commit | a86eeca5c766d0ddac08dde8573d7d54223b97b2 (patch) | |
tree | ca01233a8d216998aa6136631b0f5bbb67563f3e /plugins/NewStory/src | |
parent | b48bccbd866fe815566077bf3c0e6a4666b571de (diff) |
fixes #2350 (Кнопку Reset стоит таки переработать, чтобы она сбрасывала в дефолт лишь текущий шаблон, а не все)
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r-- | plugins/NewStory/src/options.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp index f1c82568e0..f6c681bda2 100644 --- a/plugins/NewStory/src/options.cpp +++ b/plugins/NewStory/src/options.cpp @@ -156,13 +156,12 @@ public: void onClick_Reset(CCtrlButton *) { - for (auto &it : templates) { - replaceStrW(it.tmpValue, nullptr); - replaceStrW(it.value, nullptr); + if (m_curr) { + replaceStrW(m_curr->tmpValue, nullptr); + replaceStrW(m_curr->value, nullptr); + m_edit.SetText(m_curr->defvalue); } - if (m_curr) - m_edit.SetText(m_curr->defvalue); UpdatePreview(0); NotifyChange(); } |