Added a reset-buffer event to give an opportunity to set the default initial style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2419,6 +2419,15 @@ void wxRichTextParagraphLayoutBox::Reset()
|
||||
{
|
||||
Clear();
|
||||
|
||||
wxRichTextBuffer* buffer = wxDynamicCast(this, wxRichTextBuffer);
|
||||
if (buffer && GetRichTextCtrl())
|
||||
{
|
||||
wxRichTextEvent event(wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, GetRichTextCtrl()->GetId());
|
||||
event.SetEventObject(GetRichTextCtrl());
|
||||
|
||||
buffer->SendEvent(event, true);
|
||||
}
|
||||
|
||||
AddParagraph(wxEmptyString);
|
||||
|
||||
Invalidate(wxRICHTEXT_ALL);
|
||||
|
Reference in New Issue
Block a user