From a86eeca5c766d0ddac08dde8573d7d54223b97b2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 4 May 2020 22:48:07 +0300 Subject: =?UTF-8?q?fixes=20#2350=20(=D0=9A=D0=BD=D0=BE=D0=BF=D0=BA=D1=83?= =?UTF-8?q?=20Reset=20=D1=81=D1=82=D0=BE=D0=B8=D1=82=20=D1=82=D0=B0=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D1=8C,=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B=20=D0=BE?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D0=B1=D1=80=D0=B0=D1=81=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=B2=20=D0=B4=D0=B5=D1=84=D0=BE=D0=BB=D1=82=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D1=8C=20=D1=82=D0=B5=D0=BA=D1=83=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD,=20=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=B2=D1=81=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/options.cpp | 9 ++++----- 1 file 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(); } -- cgit v1.2.3