From 5b2fa6f292b910409066b2ca748b3f7b8ff020b1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 31 Oct 2023 13:09:10 +0300 Subject: NewStory: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fixes #3755 (NewStory: неработающий тэг color парсится криво); - fixes bug with template preview in the options dialog --- plugins/NewStory/src/options.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/NewStory/src/options.cpp') diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp index ee84cd1b79..ab1be7e672 100644 --- a/plugins/NewStory/src/options.cpp +++ b/plugins/NewStory/src/options.cpp @@ -78,14 +78,14 @@ class CTemplateOptsDlg : public CBaseOptsDlg { replaceStrW(m_curr->tmpValue, m_edit.GetText()); - ItemData item; + ItemData item = {}; item.hContact = m_hContact; item.hEvent = m_hDbEVent; item.load(true); + item.fill(int(m_curr - templates)); // copy data from template to event - CMStringW wszText(item.formatStringEx(int(m_curr - templates), m_curr->tmpValue)); - preview.SetText(wszText); - gpreview.SetText(wszText); + preview.SetText(item.formatStringEx(m_curr->tmpValue)); + gpreview.SendMsg(MTM_UPDATEEX, MTEXT_FLG_RTF, LPARAM(item.formatRtf().c_str())); } CCtrlBase preview, gpreview; -- cgit v1.2.3