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 --- libs/mTextControl/src/textcontrol.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libs/mTextControl/src/textcontrol.cpp') diff --git a/libs/mTextControl/src/textcontrol.cpp b/libs/mTextControl/src/textcontrol.cpp index f1b92d2f10..5a871d42e5 100644 --- a/libs/mTextControl/src/textcontrol.cpp +++ b/libs/mTextControl/src/textcontrol.cpp @@ -109,6 +109,20 @@ static LRESULT CALLBACK MTextControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, InvalidateRect(hwnd, nullptr, TRUE); return TRUE; + case MTM_UPDATEEX: + if (data->text) { + delete[] data->text; + data->text = nullptr; + } + + if (data->mtext) + MTextDestroy(data->mtext); + + data->mtext = MTextCreateEx(data->htu, (char*)lParam, wParam); + MTextSetParent(data->mtext, hwnd); + InvalidateRect(hwnd, nullptr, TRUE); + return TRUE; + case WM_PAINT: return MTextControl_OnPaint(hwnd); -- cgit v1.2.3