diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-31 13:09:10 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-31 13:09:10 +0300 |
commit | 5b2fa6f292b910409066b2ca748b3f7b8ff020b1 (patch) | |
tree | 97408436343ad0144a9b76e4dea1897ee1942d3e /libs/mTextControl/src | |
parent | 6a495da1906284b770f1aceee892d7e60fe1582e (diff) |
NewStory:
- fixes #3755 (NewStory: неработающий тэг color парсится криво);
- fixes bug with template preview in the options dialog
Diffstat (limited to 'libs/mTextControl/src')
-rw-r--r-- | libs/mTextControl/src/textcontrol.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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); |