summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-31 13:09:10 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-31 13:09:10 +0300
commit5b2fa6f292b910409066b2ca748b3f7b8ff020b1 (patch)
tree97408436343ad0144a9b76e4dea1897ee1942d3e /plugins/NewStory/src/options.cpp
parent6a495da1906284b770f1aceee892d7e60fe1582e (diff)
NewStory:
- fixes #3755 (NewStory: неработающий тэг color парсится криво); - fixes bug with template preview in the options dialog
Diffstat (limited to 'plugins/NewStory/src/options.cpp')
-rw-r--r--plugins/NewStory/src/options.cpp8
1 files changed, 4 insertions, 4 deletions
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;