Added an optimisation when the control is frozen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
04ad5f5aea
commit
15d0a86eb2
@ -3064,8 +3064,11 @@ void wxRichTextCtrl::DoWriteText(const wxString& value, int flags)
|
||||
wxString valueUnix = wxTextFile::Translate(value, wxTextFileType_Unix);
|
||||
|
||||
GetFocusObject()->InsertTextWithUndo(& GetBuffer(), m_caretPosition+1, valueUnix, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE);
|
||||
wxRichTextDrawingContext context(& GetBuffer());
|
||||
GetBuffer().Defragment(context);
|
||||
if (!IsFrozen())
|
||||
{
|
||||
wxRichTextDrawingContext context(& GetBuffer());
|
||||
GetBuffer().Defragment(context);
|
||||
}
|
||||
|
||||
if ( flags & SetValue_SendEvent )
|
||||
wxTextCtrl::SendTextUpdatedEvent(this);
|
||||
|
Loading…
Reference in New Issue
Block a user