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:
Julian Smart 2014-01-23 21:01:46 +00:00
parent 04ad5f5aea
commit 15d0a86eb2

View File

@ -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);